Deals with HTTP headers. Internally the indices are always lowercase. Empty string is the status line.
Public Member Functions | |
void | AddIfNew (string name, string value) |
Sets the named header only if it's not already set. More... | |
void | Overwrite (string name, string value) |
Sets the named header with the given single value. More... | |
string | Get (string header) |
Gets the last header with the named value. More... | |
List< string > | GetAll (string header) |
Gets the set of headers of the given type. E.g. all Set-Cookie headers. More... | |
void | Add (string name, string value) |
Appends the named header. More... | |
void | Apply (string rawText) |
Applies the given raw headers, overwriting everything else in this set. More... | |
override string | ToString () |
Gets this as a valid string of HTTP headers. More... | |
Dictionary< string, string > | ToSingleSet () |
Gets the headers as a set for use by Unity's WWW. More... | |
Static Public Member Functions | |
static Dictionary< string, List< string > > | ParseHeaders (string rawHeaders) |
Converts a raw header string to a set of headers. The status line is indexed as the empty string. More... | |
static string | HeaderString (Dictionary< string, List< string >> headers) |
Converts a list of headers to the raw header string. Always includes the status line. Note that the header set contains the status line indexed as the empty string. More... | |
static string | ToHeaderCapitals (string h) |
Converts a header name, e.g. "content-type", to its capitalized form. This is technically not required by the standard, but some servers are non-compliant and don't work correctly if you send broken headers. More... | |
Public Attributes | |
Dictionary< string, List < string > > | lines |
The raw headers set. Indices are always lowercase. Empty string is the status line. More... | |
Properties | |
string | status [get, set] |
The status line. Null if none set. More... | |
string | this[string header] [get, set] |
Gets/ sets a header (overwrites rather than appends). More... | |
Static Private Attributes | |
static string[] | HeaderSplit =new string[]{"\r\n"} |
Used to split headers up. More... | |
|
inline |
Appends the named header.
|
inline |
Sets the named header only if it's not already set.
|
inline |
Applies the given raw headers, overwriting everything else in this set.
|
inline |
Gets the last header with the named value.
|
inline |
Gets the set of headers of the given type. E.g. all Set-Cookie headers.
|
inlinestatic |
Converts a list of headers to the raw header string. Always includes the status line. Note that the header set contains the status line indexed as the empty string.
|
inline |
Sets the named header with the given single value.
|
inlinestatic |
Converts a raw header string to a set of headers. The status line is indexed as the empty string.
|
inlinestatic |
Converts a header name, e.g. "content-type", to its capitalized form. This is technically not required by the standard, but some servers are non-compliant and don't work correctly if you send broken headers.
|
inline |
Gets the headers as a set for use by Unity's WWW.
|
inline |
Gets this as a valid string of HTTP headers.
|
staticprivate |
Used to split headers up.
Dictionary<string,List<string> > PowerUI.Http.Headers.lines |
The raw headers set. Indices are always lowercase. Empty string is the status line.
|
getset |
The status line. Null if none set.
|
getset |
Gets/ sets a header (overwrites rather than appends).