WebHeaderCollection Class
Contains a collection of name/value pairs that form the http request and response headers.
Namespace: elsystem.net
Properties
Additional
properties, methods, and events are described in the classes listed
under Inheritance Hierarchy (see below).
Name | Type | Description | |
![]() |
Count | int | Gets the number of items in the collection. |
![]() |
Item(Idx) | enum | Gets or sets the HttpRequestHeader value at the specified index. |
![]() |
Item(Idx) | enum | Gets or sets the HttpResponseHeader at the specified index. |
Methods
Name | Description | |
![]() |
Add(header) | Inserts the specified header into the collection. The header must be a string in the “name:value” format. If the collection already contains a header with the specified name, then the value part of the header will be added to the existing comma-separated list of values associated with the name. |
![]() |
Add(header,value) | Inserts the specified HttpRequestHeader header, with the specified string value, into the collection. |
![]() |
Add(header,value) | Inserts the specified HttpResponseHeader header, with the specified string value, into the collection. |
![]() |
Add(name,value) | Inserts a header with the specified name and value into the collection. If the header with the specified name already exists in the collection, the value is added to the existing comma-separated list of values associated with the name. |
![]() |
Clear() | Removes all header items from the collection. |
![]() |
Get(index) | Returns the header string specified by the index. |
![]() |
Get(name) | Returns the header string specified by the string name. If no header with the specified name exists in the collection then NULL is returned. |
![]() |
IsRestriected(headerName) | True if the headerName is restricted and must be set using properties or is set by the system; returns false otherwise. |
![]() |
IsRestriected(headerName,response) | True if the headerName is restricted and must be set using properties or is set by the system; returns false otherwise. If response is True, tests for a response header, if False, tests for a request header. |
![]() |
Remove(name) | Removes the string with the specified name from the collection. |
![]() |
Remove(header) | Removes the specified header from the collection. |
![]() |
Remove(header) | Removes the specified header from the collection. |
![]() |
Set(name,value) | Sets string name to the specified string value. |
![]() |
Set(header,value) | Sets specified request header to the specified string value. |
![]() |
Set(header,value) | Sets specified response header to the specified string value. |
![]() |
ToString() | Returns a string representation of the WebHeaderCollection object. |