HttpHeaders¶
Import: import system.net;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
HttpHeaders¶
Case-insensitive header names with ordered repeated values. Validation occurs when sending.
constructor¶
Creates an empty header collection.
length¶
Number of stored header pairs, including repeated names.
append¶
Appends a value without replacing existing values for the same name.
set¶
Replaces all existing values for name with one value at the end of the collection.
get¶
Returns the first matching value, or None when absent.
get_all¶
Copies every matching value in stored order; JS Fetch may already have combined repeated headers.
remove¶
Removes all values with the given case-insensitive name.
to_json¶
Serializes header pairs in order, preserving repeated names.