Class TBrookHTTPResponse
Unit
Declaration
type TBrookHTTPResponse = class(TBrookHandledPersistent)
Description
Class which dispatches headers, contents, binaries, files and other data to the client.
Hierarchy
- TObject
- TPersistent
- TBrookHandledPersistent
- TBrookHTTPResponse
Overview
Methods
constructor Create(AHandle: Pointer); virtual; |
|
destructor Destroy; override; |
|
procedure SetCookie(const AName, AValue: string); virtual; |
|
procedure Send(const AValue, AContentType: string; AStatus: Word); virtual; |
|
procedure SendFmt(const AFormat: string; const AArgs: array of const; const AContentType: string; AStatus: Word); virtual; |
|
procedure SendBinary(ABuffer: Pointer; ASize: NativeUInt; const AContentType: string; AStatus: Word); virtual; |
|
procedure SendBytes(const ABytes: TBytes; ASize: NativeUInt; const AContentType: string; AStatus: Word); virtual; |
|
procedure SendFile(ASize: NativeUInt; AMaxSize, AOffset: UInt64; const AFileName: TFileName; ADownloaded: Boolean; AStatus: Word); virtual; |
|
procedure SendStream(AStream: TStream; AFreed: Boolean; AStatus: Word); overload; virtual; |
|
procedure SendStream(AStream: TStream; AStatus: Word); overload; virtual; |
|
procedure SendEmpty(const AContentType: string); overload; virtual; |
|
procedure SendEmpty; overload; virtual; |
|
procedure SendAndRedirect(const AValue, ADestination, AContentType: string; AStatus: Word); overload; virtual; |
|
procedure SendAndRedirect(const AValue, ADestination, AContentType: string); overload; virtual; |
|
procedure Download(const AFileName: TFileName; AStatus: Word); overload; virtual; |
|
procedure Render(const AFileName: TFileName; AStatus: Word); overload; virtual; |
|
procedure Download(const AFileName: TFileName); overload; virtual; |
|
procedure Render(const AFileName: TFileName); overload; virtual; |
|
procedure Reset; virtual; |
|
procedure Clear; virtual; |
|
function IsEmpty: Boolean; |
Properties
property Compressed: Boolean read FCompressed write FCompressed; |
|
property Headers: TBrookStringMap read FHeaders; |
|
property Cookies: TBrookHTTPCookies read FCookies write SetCookies; |
|
property Empty: Boolean read IsEmpty; |
Description
Methods
constructor Create(AHandle: Pointer); virtual; |
|
Creates an instance of Parameters
|
destructor Destroy; override; |
|
Frees an instance of |
procedure SetCookie(const AName, AValue: string); virtual; |
|
Sets server cookie to the response handle. Parameters
|
procedure SendFile(ASize: NativeUInt; AMaxSize, AOffset: UInt64; const AFileName: TFileName; ADownloaded: Boolean; AStatus: Word); virtual; |
|
Sends a file to the client. Parameters
|
procedure SendEmpty; overload; virtual; |
|
Sends an HTTP status 204 to the client indicating the server has fulfilled the request, but does not need to return a content. |
procedure Download(const AFileName: TFileName; AStatus: Word); overload; virtual; |
|
Offers a file as download. Parameters
|
procedure Render(const AFileName: TFileName; AStatus: Word); overload; virtual; |
|
Sends a file to be rendered. Parameters
|
procedure Download(const AFileName: TFileName); overload; virtual; |
|
Offers a file as Parameters
|
procedure Render(const AFileName: TFileName); overload; virtual; |
|
Sends a file to be rendered. Parameters
|
procedure Reset; virtual; |
|
Resets status and internal buffers of the response handle preserving all headers and cookies. |
procedure Clear; virtual; |
|
Clears all headers, cookies, status and internal buffers of the response object. |
function IsEmpty: Boolean; |
|
Checks if the response is empty. |
Properties
property Headers: TBrookStringMap read FHeaders; |
|
Hash table containing the |
property Cookies: TBrookHTTPCookies read FCookies write SetCookies; |
|
|
property Empty: Boolean read IsEmpty; |
|
Determines if the response is |
Generated by PasDoc 0.16.0.