Difference between revisions of "THttpCli.OnBeforeHeaderSend"

From Overbyte
Jump to navigation Jump to search
m (THttpCli:OnBeforeHeaderSend moved to THttpCli.OnBeforeHeaderSend)
 
Line 1: Line 1:
 +
[[Main_Page | Main page]] -> [[ICS_Components_Reference | ICS components reference]]
 +
-> [[THttpCli]] -> [[THttpCli.OnBeforeHeaderSend | OnBeforeHeaderSend]]
 
== Definition ==
 
== Definition ==
  

Latest revision as of 17:42, 19 February 2006

Main page -> ICS components reference -> THttpCli -> OnBeforeHeaderSend

Definition

procedure (Sender: TObject; const Method: String; Headers: TStrings) of object;

  • Sender : the client which fired the event
  • Method : the method of the request (HEAD, GET, POST, PUT)
  • Headers : the headers which are about to be sent to the server

Description

This event will fire before THttpCli component sends the request headers to the server. You can modify the headers by manipulating the Headers parameter.

You can add your headers to the string list Headers if you need to.

Headers[0] is containing the verb, the URL and the protocol version:

GET some-url-here HTTP/1.0

It is not an orthodox method but you can also implement here new type of HTTP verbs (eg: DELETE, TRACE ... etc.) which are not currently exposed directly by the component by rewriting Headers[0].

Examples

nothing yet

Best practices

nothing yet