THttpFields
A collection of HTTP fields/headers.
Methods
Method Add:THttpField(name:String, value:String)
Adds a new entry with the specified name and value.
The name can be a standard HTTP header name or a custom name.
Returns
The newly created THttpField instance.
Method Add:THttpField(header:EHttpHeader, value:String)
Adds a new entry with the specified header and value.
Returns
The newly created THttpField instance.
Method Add( fields:THttpFields )
Adds all fields from another THttpFields collection.
Method Add:THttpField( _field:THttpField )
Adds the specified THttpField to the collection.
Returns
The added THttpField instance.
Method GetFirst:String(name:String)
Retrieves the first value associated with the specified field name.
Returns
The value of the field, or Null if not found.
Method GetFirst:String(header:EHttpHeader)
Retrieves the first value associated with the specified header.
Returns
The value of the header, or Null if not found.
Method Add:THttpField( line:String )
Adds a header line in the format "Name: Value".
Method HasHeader:Int(name:String)
Checks if a header with the specified name exists in the collection.
Headers with custom names can be added, so this method checks by string name.
Method HasHeader:Int(header:EHttpHeader)
Checks if a header with the specified header exists in the collection.
Method ToSList:TSList()
Converts the headers to a TSList suitable for libcurl.
Method IsEmpty:Int()
Checks if the collection is empty.
