RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCGIRequest.WriteHeaders Method

Writes an HTTP header string.

Pascal
function WriteHeaders(StatusCode: Integer; const StatusString: AnsiString; const Headers: AnsiString): Boolean; override;
C++
virtual __fastcall Boolean WriteHeaders(int StatusCode, const AnsiString StatusString, const AnsiString Headers);

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 status of the request. 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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!