Back to product page

Add method (HttpHeaders)


Adds new header to the collection.

Type

A HttpHeader object. Reference to new HttpHeader object that was created.

Syntax

  • Basic
object.Add (Name, [Value])
The Add(object,Name,Value) syntax has these parts:
objectAn expression evaluating to an object of type HttpHeaders.
NameRequired. A String value. Name of the header.
ValueOptional. A Variant value. Value that will be stored in the header.

Remarks

Add method will add new header to the collection of all headers, usually for the Request object. To add new header, you should use code like this:
    wodHttp1.Request.Headers.Add "User-Agent", "WeOnlyDo! Http client component"
Returned reference to HttpHeader object can be ignored.

Platforms

Windows