HTTPRequestHeaders Methods |
The HTTPRequestHeaders type exposes the following members.
Name | Description | |
---|---|---|
Add |
Adds a new header containing the specified name and value.
(Inherited from HTTPHeaders.) | |
AddRange |
Adds one or more headers
(Inherited from HTTPHeaders.) | |
AllValues |
Returns all values of the named header in a single string, delimited by commas
(Inherited from HTTPHeaders.) | |
AssignFromString |
Parses a string and assigns the headers parsed to this object
(Overrides HTTPHeadersAssignFromString(String).) | |
ByteCount | (Overrides HTTPHeadersByteCount.) | |
Clone |
Clones the HTTP request headers
| |
Count |
Number of HTTP headers
(Inherited from HTTPHeaders.) | |
CountOf |
Returns the count of instances of the named header
(Inherited from HTTPHeaders.) | |
Equals | (Inherited from Object.) | |
Exists |
Determines if the Headers collection contains a header of the specified name, with any value.
(Inherited from HTTPHeaders.) | |
ExistsAndContains |
Determines if the Headers collection contains one or more headers of the specified name, and
sHeaderValue is part of one of those Headers' value.
(Inherited from HTTPHeaders.) | |
ExistsAndEquals |
Determines if the Headers collection contains a header of the specified name, and sHeaderValue=Header's value. Similar
to a case-insensitive version of: headers[sHeaderName]==sHeaderValue, although it checks all instances of the named header.
(Inherited from HTTPHeaders.) | |
ExistsAny |
Determines if the Headers collection contains any header from the specified list, with any value.
(Inherited from HTTPHeaders.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindAll |
Returns all instances of the named header
(Inherited from HTTPHeaders.) | |
FreeReaderLock | (Inherited from HTTPHeaders.) | |
FreeWriterLock |
If you get the Writer lock, Free it ASAP or you're going to hang or deadlock the Session
(Inherited from HTTPHeaders.) | |
GetEnumerator |
Warning: You should protect your enumeration using the GetReaderLock
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetReaderLock |
Get the Reader Lock if you plan to enumerate the Storage collection.
(Inherited from HTTPHeaders.) | |
GetTokenValue |
Returns the Value from a token in the header. Correctly handles double-quoted strings. Requires semicolon for delimiting tokens
Limitation: FAILS if semicolon is in token's value, even if quoted.
FAILS in the case of crazy headers, e.g. Header: Blah="SoughtToken=Blah" SoughtToken=MissedMe
We really need a "proper" header parser
(Inherited from HTTPHeaders.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWriterLock |
Get the Writer Lock if you plan to change the Storage collection.
NB: You only need this lock if you plan to change the collection itself; you can party on the items in the collection if you like without locking.
(Inherited from HTTPHeaders.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove(String) |
Removes all headers from the header collection which have the specified name.
(Inherited from HTTPHeaders.) | |
Remove(HTTPHeaderItem) |
Removes a HTTPHeader item from the collection
(Inherited from HTTPHeaders.) | |
RemoveAll |
Removes all HTTPHeader items from the collection
(Inherited from HTTPHeaders.) | |
RemoveRange |
Removes all headers from the header collection which have the specified names.
(Inherited from HTTPHeaders.) | |
RenameHeaderItems |
Renames all headers in the header collection which have the specified name.
(Inherited from HTTPHeaders.) | |
ToArray |
Copies the Headers to a new array.
Prefer this method over the enumerator to avoid cross-thread problems.
(Inherited from HTTPHeaders.) | |
ToByteArray(Boolean, Boolean, Boolean) |
Returns a byte array representing the HTTP headers.
| |
ToByteArray(Boolean, Boolean, Boolean, String) |
Returns a byte array representing the HTTP headers.
| |
ToString |
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP request line, and no trailing CRLF
(Overrides ObjectToString.) | |
ToString(Boolean, Boolean) |
Returns a string representing the HTTP headers, without the SCHEME+HOST in the HTTP REQUEST line
| |
ToString(Boolean, Boolean, Boolean) |
Returns a string representing the HTTP headers.
|