Contents - Methods - Properties
ISAPI response incapsulation
Description
Created by TISAPIApp for every incoming request.
Contents - TFRISAPIResponse - Properties
~TFRISAPIResponse
DestructorAddCookieC++ declaration
__fastcall virtual ~TFRISAPIResponse(void)
Description
Normally you should not free TFRISAPIResponse objects, it will be done by TISAPIApp.
Adding cookies to HTTP header ('Set-Cookie' header fields)AppendDelphi declaration
procedure AddCookie(Name, Value: AnsiString; Expires: TDateTime; Path, Domain: AnsiString; Secure: Boolean);
C++ declaration
void __fastcall AddCookie(System::AnsiString Name, System::AnsiString Value, System::TDateTime Expires, System::AnsiString Path, System::AnsiString Domain, bool Secure)
Description
Name - cookie nameValue - cookie value
Expires - datetime,
Path - URL path
Domain - domain name
To disable Expires, set it <= 0.
If Expires is evaluated, local time is expected. Before sending it will internally be converted into GMT.
See also cookies specification.
Add string to HTMLResultCreateDelphi declaration
procedure Append(const S: String);
C++ declaration
void __fastcall Append(const System::AnsiString S)
Description
Does the same as TFRISAPIResponse.HTMLResult.Append , but shorter.
ConstructorDestroyDelphi declaration
constructor Create(pECB: PEXTENSION_CONTROL_BLOCK);
Description
Normally you should not create TFRISAPIResponse objects, it will be created by TISAPIApp for every request.
DestructorRedirectDelphi declaration
destructor Destroy;
Description
Normally you should not free TFRISAPIResponse objects, it will be done by TISAPIApp.
Redirecting client to other websiteSendDelphi declaration
function Redirect(const sURL: String): Boolean;
C++ declaration
bool __fastcall Redirect(const System::AnsiString sURL)
Description
Internally uses server the supported ISAPI function HSE_REQ_SEND_URL_REDIRECT_RESP
Send response header and html text/or stream to the clientSendStreamDelphi declaration
function Send: Boolean;
C++ declaration
bool __fastcall Send(void)
Description
Called automatically after request-handling events, only once for one request.
Internal stream sendingSendURLDelphi declaration
function SendStream(AStream: TStream): Boolean;
C++ declaration
bool __fastcall SendStream(Classes::TStream *AStream)
Description
Called from the Send function.
Redirecting the client inside the same serverSetHTMLResultDelphi declaration
function SendURL(const sURL: String): Boolean;
C++ declaration
bool __fastcall SendURL(const System::AnsiString sURL)
Description
Internally uses the server supported ISAPI function HSE_REQ_SEND_URL
Internal HTMLResult setterSetResultStreamDelphi declaration
procedure SetHTMLResult(Value: TStringList);
C++ declaration
void __fastcall SetHTMLResult(Classes::TStringList *Value)
Description
Erases previous HTMLResult.
Internal ResultStream setterTFRISAPIResponseDelphi declaration
procedure SetResultStream(Value: TStream);
C++ declaration
void __fastcall SetResultStream(Classes::TStream *Value)
Description
Frees the previous stream object, when evaluated.
ConstructorC++ declaration
__fastcall TFRISAPIResponse(Isapi::PEXTENSION_CONTROL_BLOCK pECB)
Description
Normally you should not create TFRISAPIResponse objects, it will be created by TISAPIApp for every request.
Contents - TFRISAPIResponse - Methods
CharSet
Charset HTTP header fieldContentTypeDelphi declaration
property CharSet: AnsiString read FCharSet write FCharSet;
C++ declaration
__property System::AnsiString CharSet={ read=FCharSet, write=FCharSet, nodefault }
Description
Default 'ISO-8859-1'
Content-type HTTP header fieldDebugStringDelphi declaration
property ContentType: AnsiString read FContentType write FContentType;
C++ declaration
__property System::AnsiString ContentType={ read=FContentType, write=FContentType, nodefault }
Description
Default 'text/html'Examples:
Plain text - 'text/plain'
JPEG image - 'image/jpeg'
PNG image - 'image/ png'
Zipped file - 'application/zip'
Debug stringDispatcherDelphi declaration
DebugString: AnsiString;
C++ declaration
System::AnsiString DebugString
Description
For debugging purposes.This string will be added to logfile in the case of an unhandled exception.
Current dispatcherExpiresDelphi declaration
property Dispatcher: TISAPIDispatcher read FDispatcher;
C++ declaration
__property TISAPIDispatcher *Dispatcher={ read=FDispatcher, nodefault }
Description
Use it to call the required Dispatcher methods.
Expires HTTP header fieldHTMLResultDelphi declaration
property Expires: TDateTime read FExpires write FExpires;
C++ declaration
__property System::TDateTime Expires={ read=FExpires, write=FExpires }
Description
Default 0.Will be sent if > 0.
If evaluated, local time is expected. Before sending, it will automatically be converted into GMT.
Resulting HTML page textLastModifiedDelphi declaration
property HTMLResult: TStringList read FHTMLResult write SetHTMLResult;
C++ declaration
__property Classes::TStringList *HTMLResult={ read=FHTMLResult, write=SetHTMLResult, nodefault }
Description
Default is empty. Add your HTML page text there.For enconding characters and URLs use THTTPCharEncDec encoding methods.
If ResultStream is assigned, it will be sent instead!
Last-modified HTTP header fieldResultStreamDelphi declaration
property LastModified: TDateTime read FLastModified write FLastModified;
C++ declaration
__property System::TDateTime LastModified={ read=FLastModified, write=FLastModified }
Description
Default 0.Will be sent if > 0.
If evaluated, local time is expected. Before sending, it will be converted into GMT.
Result as streamStatusDelphi declaration
property ResultStream: TStream read FResultStream write SetResultStream;
C++ declaration
__property Classes::TStream *ResultStream={ read=FResultStream, write=SetResultStream, nodefault }
Description
If you assign stream to this variable, it will be sent to the client instead of HTMLResult (don't forget to set right ContentType ).Stream will be freed automatically after it is sent.
Response status HTTP header fieldWWWAuthenticateDelphi declaration
property Status: DWORD read FHttpStatusCode write FHttpStatusCode;
C++ declaration
__property int Status={ read=FHttpStatusCode, write=FHttpStatusCode, nodefault }
Description
Default 200 (all OK).
WWW-Authenticate HTTP header fieldDelphi declaration
property WWWAuthenticate: AnsiString read FWWWAuthenticate write FWWWAuthenticate;
C++ declaration
__property System::AnsiString WWWAuthenticate={ read=FWWWAuthenticate, write=FWWWAuthenticate, nodefault }
Description
Usage depends on the server...