Unit 'HTTPDefs' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

THTTPHeader

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for HTTP header management

Declaration

Source position: httpdefs.pp line 342

type THTTPHeader = class(TObject)

public

  constructor Create; virtual;

  

Creates an HTTP header instance

  destructor Destroy; override;

  

Destroys the HTTP header instance

  function HeaderIsSet();

  

Checks if a specific header field is set

  function GetHeader();

  

Gets the value of a specific header field

  procedure SetHeader();

  

Sets the value of a specific header field

  procedure SetFieldByName();

  

Sets a header field value by field name

  function GetFieldByName();

  

Gets a header field value by field name

  class function GetVariableHeaderName();

  

Gets the header field name for an HTTP variable type

  class function GetVariableHeaderType();

  

Gets the HTTP variable type for a header field name

  class function ParseContentType();

  

Parses a content type header value

  function GetCustomHeader(); virtual;

  

Gets a custom header field value by name

  procedure SetCustomHeader(); virtual;

  

Sets a custom header field value by name

  function LoadFromStream();

  

Loads HTTP headers from a stream

  function LoadFromStrings(); virtual;

  

Loads HTTP headers from a string list

  property FieldCount: Integer; [r] deprecated ;

  

Number of header fields

  property Fields []: string; [r] deprecated ;

  

Header field name and value at the specified index

  property FieldNames []: string; [r] deprecated ;

  

Name of the header field at the specified index

  property FieldValues []: string; [r] deprecated ;

  

Value of the header field at the specified index

  property Accept: string; [rw]

  

Accept header field value

  property AcceptCharset: string; [rw]

  

Accept-Charset header field value

  property AcceptEncoding: string; [rw]

  

Accept-Encoding header field value

  property AcceptLanguage: string; [rw]

  

Accept-Language header field value

  property Authorization: string; [rw]

  

Authorization header field value

  property Connection: string; [rw]

  

Connection header field value

  property ContentEncoding: string; [rw]

  

Content-Encoding header field value

  property ContentLanguage: string; [rw]

  

Content-Language header field value

  property ContentLength: Integer; [rw]

  

Content-Length header field value

  property ContentType: string; [rw]

  

Content-Type header field value

  property Date: string; [rw]

  

Date header field value

  property Expires: string; [rw]

  

Expires header field value

  property From: string; [rw]

  

From header field value

  property Host: string; [rw]

  

Host header field value

  property IfModifiedSince: string; [rw]

  

If-Modified-Since header field value

  property LastModified: string; [rw]

  

Last-Modified header field value

  property Location: string; [rw]

  

Location header field value

  property Pragma: string; [rw]

  

Pragma header field value

  property Referer: string; [rw]

  

Referer header field value

  property RetryAfter: string; [rw]

  

Retry-After header field value

  property Server: string; [rw]

  

Server header field value

  property UserAgent: string; [rw]

  

User-Agent header field value

  property Warning: string; [rw]

  

Warning header field value

  property WWWAuthenticate: string; [rw]

  

WWW-Authenticate header field value

  property Via: string; [rw]

  

Via header field value

  property HTTPAccept: string; [rw]

  

HTTP Accept header accessor property

  property HTTPAcceptCharset: string; [rw]

  

HTTP Accept-Charset header accessor property

  property HTTPAcceptEncoding: string; [rw]

  

HTTP Accept-Encoding header accessor property

  property HTTPIfModifiedSince: string; [rw]

  

HTTP If-Modified-Since header accessor property

  property HTTPReferer: string; [rw]

  

HTTP Referer header accessor property

  property HTTPUserAgent: string; [rw]

  

HTTP User-Agent header accessor property

  property Cookie: string; [rw]

  

Cookie header field value

  property SetCookie: string; [rw]

  

Set-Cookie header field value

  property HTTPXRequestedWith: string; [rw]

  

HTTP X-Requested-With header accessor property

  property HttpVersion: string; [rw]

  

HTTP protocol version

  property ProtocolVersion: string; [rw]

  

Protocol version string

  property PathInfo: string; [rw]

  

PATH_INFO environment variable value

  property PathTranslated: string; [rw]

  

PATH_TRANSLATED environment variable value

  property RemoteAddress: string; [rw]

  

REMOTE_ADDR environment variable value

  property RemoteAddr: string; [rw]

  

Alias for RemoteAddress property

  property RemoteHost: string; [rw]

  

REMOTE_HOST environment variable value

  property ScriptName: string; [rw]

  

SCRIPT_NAME environment variable value

  property ServerPort: Word; [rw]

  

SERVER_PORT environment variable value

  property Method: string; [rw]

  

HTTP request method

  property URL: string; [rw]

  

Complete request URL

  property Query: string; [rw]

  

QUERY_STRING environment variable value

  property Content: string; [rw]

  

Request content as string

  property ContentBytes: TBytes; [rw]

  

Request content as byte array

  property CookieFields: TStrings; [rw]

  

Collection of cookie name-value pairs

  property ContentFields: TStrings; [r]

  

Collection of content form fields

  property QueryFields: TStrings; [r]

  

Collection of query string name-value pairs

  property CustomHeaders: TStringList; [r]

  

Collection of custom header fields

end;

Inheritance

THTTPHeader

  

Base class for HTTP header management

|

TObject

Description

THTTPHeader provides common functionality for handling HTTP headers, variables, and content. It serves as the base class for both TRequest and TResponse classes.

See also

TRequest

  

HTTP request representation

TResponse

  

HTTP response representation


Documentation generated on: Jan 16 2026