Skip to content

TRequest

HTTP request representation

Declaration

Source position: httpdefs.pp line 484

type

  TRequest = class(THTTPHeader)
  public
    TConnectionIDAllocator = procedure(out aID: string) of object;
  public
  class var
    IDAllocator: TConnectionIDAllocator;
    MaxBodySize: SizeInt;
    DefaultRequestUploadDir: string;
  constructor Create;
  destructor destroy;
  function GetNextPathInfo : string;
  function ToString : RTLString;
  property RequestID: string; {r}
  property RouteParams[AParam : string]: string; {rw}
  property ReturnedPathInfo: string; {rw}
  property LocalPathPrefix: string; {r}
  property CommandLine: string; {r}
  property Command: string; {r}
  property URI: string; {rw}
  property QueryString: string; {rw}
  property HeaderLine: string; {r}
  property Files: TUploadedFiles; {r}
  property HandleGetOnPost: Boolean; {rw}
  property OnUnknownEncoding: TOnUnknownEncodingEvent; {rw}
  property OnStreamEncodingEvent: TOnStreamEncodingEvent; {rw}
  property IfMatch: string; {rw}
  property IfNoneMatch: string; {rw}
  property IfRange: string; {rw}
  property IfUnModifiedSince: string; {rw}
  property ContentRange: string; {rw}
  property TE: string; {rw}
  property Upgrade: string; {rw}
  property KeepFullContents: Boolean; {rw}
  end;

Description

TRequest represents an HTTP request received by a web server. It extends THTTPHeader and provides access to request data including headers, query parameters, form data, uploaded files, and other request information.

Properties

Member Visibility Description
Command read only public HTTP command (method and URI)
CommandLine read only public HTTP command line from request
ContentRange public Content-Range header field value
Files read only public Collection of uploaded files
HandleGetOnPost public Whether to handle GET parameters on POST requests
HeaderLine read only public Complete header line from request
IfMatch public If-Match header field value
IfNoneMatch public If-None-Match header field value
IfRange public If-Range header field value
IfUnModifiedSince public If-Unmodified-Since header field value
KeepFullContents public Whether to keep full request contents in memory
LocalPathPrefix read only public Local path prefix for the request
QueryString public Query string portion of the request
RequestID read only public Unique request identifier
ReturnedPathInfo public Path info that was returned from GetNextPathInfo
RouteParams public Route parameter value by name
TE public TE (Transfer-Encoding) header field value
Upgrade public Upgrade header field value
URI public URI of the HTTP request
See all Properties

Methods

Member Visibility Description
Create public Creates a new request instance
destroy public Destroys the HTTP request instance
GetNextPathInfo public Gets the next path info segment
ToString public Returns string representation of the request
See all Methods

Events

Member Visibility Description
OnStreamEncodingEvent public Event handler for stream encoding processing
OnUnknownEncoding public Event handler for unknown content encoding
See all Events

Fieldss

Member Visibility Description
DefaultRequestUploadDir public Default directory for uploaded files
IDAllocator public Connection ID allocator instance
MaxBodySize public
See all Fieldss

See also

Name Description
TResponse HTTP response representation
THTTPHeader Base class for HTTP header management
TUploadedFiles Collection of uploaded files