Class TRALRequest

Unit

Declaration

type TRALRequest = class(TRALHTTPHeaderInfo)

Description

Class that stores everything regarding REQUEST data

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TObject); override;
Public destructor Destroy; override;
Public function AddBody(const AText: StringRAL; const AContextType: StringRAL = rctTEXTPLAIN): TRALRequest; reintroduce;
Public function AddCookie(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;
Public function AddField(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;
Public function AddFile(AStream: TStream; const AFileName: StringRAL = ''): TRALRequest; reintroduce; overload;
Public function AddFile(const AFileName: StringRAL): TRALRequest; reintroduce; overload;
Public function AddHeader(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;
Public function GetRequestEncStream(const AEncode: boolean = true): TStream; virtual; abstract;
Public function GetRequestEncText(const AEncode: boolean = true): StringRAL; virtual; abstract;
Protected function GetRequestStream: TStream;
Protected function GetRequestText: StringRAL;
Protected function GetURL: StringRAL;
Public procedure Clone(ASource: TRALRequest); reintroduce;
Protected procedure SetQuery(const AValue: StringRAL);
Protected procedure SetRequestStream(const AValue: TStream); virtual; abstract;
Protected procedure SetRequestText(const AValue: StringRAL); virtual; abstract;

Properties

Published property Authorization: TRALAuthorization read FAuthorization write FAuthorization;
Published property ClientInfo: TRALClientInfo read FClientInfo write FClientInfo;
Published property ContentSize: Int64RAL read FContentSize write FContentSize;
Published property Host: StringRAL read FHost write FHost;
Published property HttpVersion: StringRAL read FHttpVersion write FHttpVersion;
Published property Method: TRALMethod read FMethod write FMethod;
Published property Protocol: StringRAL read FProtocol write FProtocol;
Published property Query: StringRAL read FQuery write SetQuery;
Public property RequestStream: TStream read GetRequestStream write SetRequestStream;
Public property RequestText: StringRAL read GetRequestText write SetRequestText;
Public property URL: StringRAL read GetURL;

Description

Methods

Public constructor Create(AOwner: TObject); override;
 
Public destructor Destroy; override;
 
Public function AddBody(const AText: StringRAL; const AContextType: StringRAL = rctTEXTPLAIN): TRALRequest; reintroduce;

Adds an UTF8 String to the body of the request.

Public function AddCookie(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;

Adds a string cookie to the body of the request.

Public function AddField(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;

Adds a string param with the "Field" kind to the request.

Public function AddFile(AStream: TStream; const AFileName: StringRAL = ''): TRALRequest; reintroduce; overload;

Adds a custom file to the body of the request from the given AStream.

Public function AddFile(const AFileName: StringRAL): TRALRequest; reintroduce; overload;

Adds a file to the body of the request based on the given AFileName.

Public function AddHeader(const AName: StringRAL; const AValue: StringRAL): TRALRequest; reintroduce;

Adds an UTF8 String to the header of the request.

Public function GetRequestEncStream(const AEncode: boolean = true): TStream; virtual; abstract;

Returns the request data in TStream format

Public function GetRequestEncText(const AEncode: boolean = true): StringRAL; virtual; abstract;

Returns the request data in UTF8String format

Protected function GetRequestStream: TStream;
 
Protected function GetRequestText: StringRAL;
 
Protected function GetURL: StringRAL;

Grabs the full URL of the request

Public procedure Clone(ASource: TRALRequest); reintroduce;
 
Protected procedure SetQuery(const AValue: StringRAL);

Grabs only the params after the "?" key and records it in FQuery attribute

Protected procedure SetRequestStream(const AValue: TStream); virtual; abstract;
 
Protected procedure SetRequestText(const AValue: StringRAL); virtual; abstract;
 

Properties

Published property Authorization: TRALAuthorization read FAuthorization write FAuthorization;
 
Published property ClientInfo: TRALClientInfo read FClientInfo write FClientInfo;
 
Published property ContentSize: Int64RAL read FContentSize write FContentSize;
 
Published property Host: StringRAL read FHost write FHost;
 
Published property HttpVersion: StringRAL read FHttpVersion write FHttpVersion;
 
Published property Method: TRALMethod read FMethod write FMethod;
 
Published property Protocol: StringRAL read FProtocol write FProtocol;
 
Published property Query: StringRAL read FQuery write SetQuery;
 
Public property RequestStream: TStream read GetRequestStream write SetRequestStream;
 
Public property RequestText: StringRAL read GetRequestText write SetRequestText;
 
Public property URL: StringRAL read GetURL;
 


GitHub Repository
Generated by PasDoc 0.16.0.