Web.CGIHTTP.TCGIRequest.WriteHeaders
Delphi
function WriteHeaders(StatusCode: Integer; const StatusString, Headers: AnsiString): Boolean; override;
C++
virtual bool __fastcall WriteHeaders(int StatusCode, const System::AnsiString StatusString, const System::AnsiString Headers);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Web.CGIHTTP.pas Web.CGIHTTP.hpp |
Web.CGIHTTP | TCGIRequest |
Description
Writes an HTTP header string.
WriteHeaders writes the HTTP headers of the response message before a call to the WriteClient method. These headers are used on the HTTP message that the WriteClient method sends in response to this request.
StatusCode is the status code of the response. This informs the client of the request's status. For a list of status code values, see the StatusCode property of TWebResponse.
StatusString is a text string that describes the status that StatusCode indicates.
Headers is a formatted string that includes any other HTTP headers to add. It represents each header as a string of the form 'Headername: Value', where name/value pairs are separated by line breaks.
WriteHeaders returns true if it succeeds in writing the specified headers.