Indy 9
TIdHTTPRequestInfo
Hierarchy, Properties, Methods, See Also, Unit: IdCustomHTTPServer
Implements a HTTP Request object.
TIdHTTPRequestInfo = class(TIdRequestHeaderInfo)
Unit
IdCustomHTTPServer
Description
TIdHTTPRequestInfo is a TObject descendant that encapsulates access to information for a HTTP request. TIdHTTPRequestInfo publishes properties that provide access to various information for a HTTP request. The properties include the HTTP session, authentication parameters, the remote computer addresses, HTTP headers, cookies, the HTTP command and version, and the document URL for the request.

TIdHTTPRequestInfo is used by TIdHTTPServer to capture HTTP headers, and to store a reference to the persistent HTTP session in the session list.


TIdHTTPRequestInfo.AuthExists
TIdHTTPRequestInfo, See Also
Indicates that an authorization header is used in the HTTP request.
property AuthExists: Boolean;
Description
AuthExists is a read-only Boolean property that indicates an authorization header is used in the HTTP request. AuthExists is set to True when the AuthUsername and AuthPassword properties have non-blank values during execution of the threaded HTTP client.

AuthExists is updated when TIdCustomHTTPServer executes an HTTP client thread, and is used to determine when a TIdDecoderMIME needs to be constructed for decoding AuthUsername and AuthPassword values from the request header.


TIdHTTPRequestInfo.AuthPassword
TIdHTTPRequestInfo, See Also
Specifies the authorization password for a HTTP request.
property AuthPassword: string;
Description
AuthPassword is a String property that specifies the authorization password from the HTTP header "Authorization:" in the HTTP request. AuthPassword is used with AuthUsername to determine the full content of the basic authorization header value.

AuthExists indicates that the AuthUsername and AuthPassword properties are used in the HTTP request.


TIdHTTPRequestInfo.AuthUsername
TIdHTTPRequestInfo, See Also
Specifies the authorization user name for the HTTP request.
property AuthUsername: string;
Description
AuthUsername is a String property that specifies the authorization user name from the HTTP header "Authorization:" in the HTTP request. AuthUsername is used with AuthPassword to determine the full content of the basic authorization header value. AuthExists indicates that the AuthUsername and AuthPassword properties are used in the HTTP request.

TIdHTTPRequestInfo.Command
TIdHTTPRequestInfo, See Also
Represents the HTTP command in the request.
property Command: string;
Description
Command is a read-only String property that represents the HTTP command received in the HTTP request, like "GET", "POST", or "HEAD". Use RawHHTTPCommand to access the entire HHTP command in it's original form.

Command is updated when TIdCustomHTTPServer reads the HTTP request from an executing threaded HTTP client. Command can be used in TIdCustomHTTPServer event handlers, like OnCommandGet and OnCommandOther, to determine the HTTP command that originated the request.


TIdHTTPRequestInfo.Cookies
TIdHTTPRequestInfo, See Also
Represents cookies for the request.
property Cookies: TIdServerCookies;
Description
Cookies is a TIdCookieColloection property use to store cookie names and values used in the HTTP request. Cookies is updated by TIdHTTPServer when a peer thread receives a HTTP request containing header values with the HTTP header "Cookie:".

TIdHTTPRequestInfo.Document
TIdHTTPRequestInfo, See Also
Specifies the path and document name for a HTTP request.
property Document: string;
Description
Document is a String property that specifies the Uniform Resource Identifier (URI) for the HTTP request. Document normally contains the path, document name, and optional parameters the URL requested.

Document is updated when TIdHTTPServer reads the HTTP request during execution of a threaded HTTP client.


TIdHTTPRequestInfo.FormParams
TIdHTTPRequestInfo, See Also
COntains a string representing values from the request post stream.
property FormParams: string;
Description
FormParams is a String property that contains the values originating in PostStream in their string representation.

TIdHTTPRequestInfo.Params
TIdHTTPRequestInfo, See Also
Represents the HTTP header values as ASCII characters.
property Params: TStrings;
Description
Params is a TString property used to store the parsed values for HTTP headers in the HTTP request. Params contains the header values after URLDecode has been used to convert the headers to their ASCII representation.

Use UnparsedParams to view the HTTP headers in their raw form.

Params is updated by TIdHTTPServer when a peer thread generates a new HTTP request.


TIdHTTPRequestInfo.PostStream
TIdHTTPRequestInfo
Stream used to pass data from a client POST request.
property PostStream: TStream;
Description
PostStream is a TStream property that represents the stream containing the data to be sent in the TIdHTTPRequestInfo used in the request for a threaded client connection. PostStream is used in TIdHTTPServer when the client thread is executed. PostStream may contain a reference to an exising stream, or may be implicitly created for the executing client thread.

When the request from the client connection has a non-zero ContentLength, PostStream is used to read the indicated number of bytes. Otherwise, all data is read into PostStream until the client connection is closed.

If the stream is created during execution of the client thread, the contents of PostStream are added to the TIdHTTPRequestInfo.UnparsedParams property for the client request.


TIdHTTPRequestInfo.QueryParams
TIdHTTPRequestInfo, See Also
Represents the query and optional parameters in an HTTP request.
property QueryParams: string;
Description
QueryParams is a String property that represents the query and optional parameters received in an HTTP request.

TIdHTTPRequestInfo.RawHTTPCommand
TIdHTTPRequestInfo
Text data containing the HTTP Command received in an HTTP request.
property RawHTTPCommand: string;
Description
RawHTTPCommand is a read-only String property that represents the raw textual data for a command read from the HTTP client connection. RawHTTPCommand is updated when the threaded client connection is executed, and contains values that are examined to set properties for the TIdHTTPRequestInfo instance like Command, Params, and Document.

TIdHTTPRequestInfo.RemoteIP
TIdHTTPRequestInfo, See Also
Identifies the remote computer for the HTTP request.
property RemoteIP: String;
Description
RemoteIP is a read-only String property used to identify the remote computer system that is the endpoint for the session used by the HTTP request.

RemoteIP is updated by TIdHTTPServer when a peer thread generates a new HTTP request.


TIdHTTPRequestInfo.Session
TIdHTTPRequestInfo, See Also
Represents the HTTP session for the request.
property Session: TIdHTTPSession;
Description
Session is a read-only TIdHTTPSession property used to represent the HTTP session that acts as the transport for the HTTP request.

Session is updated by TIdHTTPServer when a peer thread generates a HTTP request.


TIdHTTPRequestInfo.UnparsedParams
TIdHTTPRequestInfo, See Also
Represents the HTTP header as URL-encoded values.
property UnparsedParams: string;
Description
UnparsedParams is a TStrings property used to store the values for HTTP headers in their URL-encoded form. UnparsedParams contains the header values in the form they were received in the HTTP request.

Use Params to view the HTTP headers in their ASCII form.

UnparsedParams is updated by TIdHTTPServer when a peer thread generates a new HTTP request.


TIdHTTPRequestInfo.Version
TIdHTTPRequestInfo, See Also
Specifies the HTTP version for the request.
property Version: string;
Description
Version is a read-only String property that represents the HTTP version retrieved as part of the HTTP request. Version is updated when TIdCustomHTTPServer reads the HTTP request during execution of a threaded HTTP client. THe value in Version is provided as an argunment to TIdCustomHTTPServer event handlers, like OnCommandGet and OnCommandOther.

TIdHTTPRequestInfo.Create
TIdHTTPRequestInfo, See Also
Constructor for the object instance.
constructor Create; override;
Description
Create is the constructor for the object instance. Create calls the inherited Create constructor. Create also allocates resources required for the Params and Cookies properties.

TIdHTTPRequestInfo.Destroy
TIdHTTPRequestInfo, See Also
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy is responsible for freeing the object instances use in the Headers, Params, and Cookies properties. Destroy calls the inherited Destroy method to complete destruction of the object instance.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.