Class TRALResponse
Unit
RALResponse
Declaration
type TRALResponse = class(TRALHTTPHeaderInfo)
Description
Base class for everything related to data response
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
constructor Create(AOwner: TObject); override; |
|
|
 |
destructor Destroy; override; |
|
|
 |
function AddBody(const AText: StringRAL; const AContextType: StringRAL = rctTEXTPLAIN): TRALResponse; reintroduce; |
|
Append an UTF8 String to the response
|
 |
function AddCookie(const AName: StringRAL; const AValue: StringRAL): TRALResponse; reintroduce; |
|
Append a name:value cookie to the response
|
 |
function AddField(const AName: StringRAL; const AValue: StringRAL): TRALResponse; reintroduce; |
|
Append a custom param of type "Field" to the response
|
 |
function AddFile(AStream: TStream; const AFileName: StringRAL = ''): TRALResponse; reintroduce; overload; |
|
Append a file to the response from given AStream
|
 |
function AddFile(const AFileName: StringRAL): TRALResponse; reintroduce; overload; |
|
Loads and append a file to the response from given AFileName
|
 |
function AddHeader(const AName: StringRAL; const AValue: StringRAL): TRALResponse; reintroduce; |
|
Append a name:value param to the header of the response
|
 |
function GetParamsCookiesText(ADateTime: TDateTime; AHeader: StringRAL = 'Set-Cookie: ') : StringRAL; |
|
Returns an UTF8 String with RALParams Cookies' Headers
|
 |
function GetResponseEncStream(const AEncode: boolean = true): TStream; virtual; abstract; |
|
Returns the response in TStream format
|
 |
function GetResponseEncText(const AEncode: boolean = true): StringRAL; virtual; abstract; |
|
Returns the response in UTF8String format
|
 |
function GetResponseStream: TStream; |
|
Returns the response in TStream format
|
 |
function GetResponseText: StringRAL; |
|
Returns the response in UTF8String format
|
 |
procedure Answer(const AFileName: StringRAL; const DispositionInline: boolean = true); overload; |
|
Loads and set a file to the response with the given AFileName and sets the disposition to inline by default.
|
 |
procedure Answer(AStatusCode: IntegerRAL); overload; |
|
Sets the response with the given status code
|
 |
procedure Answer(AStatusCode: IntegerRAL; const AMessage: StringRAL; const AContentType: StringRAL = rctAPPLICATIONJSON); overload; |
|
Sets the response with the given status code, UTF8 String and Content-Type
|
 |
procedure Answer(AStatusCode: IntegerRAL; const AStream: TStream; const AContentType: StringRAL = rctAPPLICATIONJSON); overload; |
|
Sets the response with the given status code, Data Stream and Content-Type
|
 |
procedure Clear; override; |
|
Empties out the Response and sets default values
|
 |
procedure GetParamsCookies(ADest: TStringList; ADateTime: TDateTime); |
|
Fills the 'ADest' Strings with RALParams Cookies' Headers
|
 |
procedure SetResponseStream(const AValue: TStream); virtual; abstract; |
|
Assign a Stream into the Response
|
 |
procedure SetResponseText(const AValue: StringRAL); virtual; abstract; |
|
Assign an UTF8String into the Response
|
Properties
 |
property ErrorCode: IntegerRAL read FErrorCode write FErrorCode; |
|
TCP Client Connection Error
|
 |
property StatusCode: IntegerRAL read FStatusCode write FStatusCode; |
|
HTTP StatusCode
|
GitHub Repository
Generated by PasDoc 0.16.0.