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
Public property Count int Gets the number of items in the collection.
Public property Item(Idx) enum Gets or sets the HttpRequestHeader value at the specified index.
Public property Item(Idx) enum Gets or sets the HttpResponseHeader at the specified index.
Methods
  Name Description
Public property 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.
Public property Add(header,value) Inserts the specified HttpRequestHeader header, with the specified string value, into the collection.
Public property Add(header,value) Inserts the specified HttpResponseHeader header, with the specified string value, into the collection.
Public property 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.
Public property Clear() Removes all header items from the collection.
Public property Get(index) Returns the header string specified by the index.
Public property 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.
Public property IsRestriected(headerName) True if the headerName is restricted and must be set using properties or is set by the system; returns false otherwise.
Public property 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.
Public property Remove(name) Removes the string with the specified name from the collection.
Public property Remove(header) Removes the specified header from the collection.
Public property Remove(header) Removes the specified header from the collection.
Public property Set(name,value) Sets string name to the specified string value.
Public property Set(header,value) Sets specified request header to the specified string value.
Public property Set(header,value) Sets specified response header to the specified string value.
Public property ToString() Returns a string representation of the WebHeaderCollection object.