Difference between revisions of "THttpCli"

From Overbyte
Jump to navigation Jump to search
Line 141: Line 141:
  
 
{|
 
{|
| valign="top" width="150" | [[THttpCli.OnBeforeHeaderSend | OnBeforeHeaderSend]] |||| align test
+
| valign="top" width="150" | [[THttpCli.OnBeforeHeaderSend | OnBeforeHeaderSend]] |||| Triggered before the header is sent.
 
|-
 
|-
| [[THttpCli.OnCommand | OnCommand]] ||||
+
| [[THttpCli.OnCommand | OnCommand]] |||| Triggered for each command sent.
 
|-
 
|-
| [[THttpCli.OnCookie | OnCookie]] ||||
+
| [[THttpCli.OnCookie | OnCookie]] |||| Triggered when a cookie has been received.
 
|-
 
|-
| [[THttpCli.OnDataPush | OnDataPush]] ||||
+
| [[THttpCli.OnDataPush | OnDataPush]] |||| Received data outside of any request.
 
|-
 
|-
| [[THttpCli.OnDataPush2 | OnDataPush2]] ||||
+
| [[THttpCli.OnDataPush2 | OnDataPush2]] |||| Received data outside of a header.
 
|-
 
|-
| [[THttpCli.OnDocBegin | OnDocBegin]] ||||
+
| [[THttpCli.OnDocBegin | OnDocBegin]] |||| Triggered when the document part is about to be received.
 
|-
 
|-
| [[THttpCli.OnDocData | OnDocData]] ||||
+
| [[THttpCli.OnDocData | OnDocData]] |||| Triggered for each packet of the document part.
 
|-
 
|-
| [[THttpCli.OnDocEnd | OnDocEnd]] ||||
+
| [[THttpCli.OnDocEnd | OnDocEnd]] |||| Triggered when the document is complete.
 
|-
 
|-
| [[THttpCli.OnHeaderBegin | OnHeaderBegin]] ||||
+
| [[THttpCli.OnHeaderBegin | OnHeaderBegin]] |||| Triggered when the first header line is about to be received.
 
|-
 
|-
| [[THttpCli.OnHeaderData | OnHeaderData]] ||||
+
| [[THttpCli.OnHeaderData | OnHeaderData]] |||| Triggered for each received header line.
 
|-
 
|-
| [[THttpCli.OnHeaderEnd | OnHeaderEnd]] ||||
+
| [[THttpCli.OnHeaderEnd | OnHeaderEnd]] |||| Triggered when the header has been completely received.
 
|-
 
|-
| [[THttpCli.OnLocationChange | OnLocationChange]] ||||
+
| [[THttpCli.OnLocationChange | OnLocationChange]] |||| Triggered whenever the server sent a location change.
 
|-
 
|-
| [[THttpCli.OnRequestDone | OnRequestDone]] ||||
+
| [[THttpCli.OnRequestDone | OnRequestDone]] |||| Triggered when a request is completed.
 
|-
 
|-
| [[THttpCli.OnRequestHeaderBegin | OnRequestHeaderBegin]] ||||
+
| [[THttpCli.OnRequestHeaderBegin | OnRequestHeaderBegin]] |||| Triggered when the first header line is about to be sent.
 
|-
 
|-
| [[THttpCli.OnRequestHeaderEnd | OnRequestHeaderEnd]] ||||
+
| [[THttpCli.OnRequestHeaderEnd | OnRequestHeaderEnd]] |||| Triggered when the last header line has been sent.
 
|-
 
|-
| [[THttpCli.OnSendBegin | OnSendBegin]] ||||
+
| [[THttpCli.OnSendBegin | OnSendBegin]] |||| Triggered before sending document part.
 
|-
 
|-
| [[THttpCli.OnSendData | OnSendData]] ||||
+
| [[THttpCli.OnSendData | OnSendData]] |||| Triggered when sending document part.
 
|-
 
|-
| [[THttpCli.OnSendEnd | OnSendEnd]] ||||
+
| [[THttpCli.OnSendEnd | OnSendEnd]] |||| Triggered when document has been sent completely.
 
|-
 
|-
| [[THttpCli.OnSessionClosed | OnSessionClosed]] ||||
+
| [[THttpCli.OnSessionClosed | OnSessionClosed]] |||| Triggered when the current connection has been closed.
 
|-
 
|-
| [[THttpCli.OnSessionConnected | OnSessionConnected]] ||||
+
| [[THttpCli.OnSessionConnected | OnSessionConnected]] |||| Triggered when the connection has been openend.
 
|-
 
|-
| [[THttpCli.OnSocketError | OnSocketError]] ||||
+
| [[THttpCli.OnSocketError | OnSocketError]] |||| Triggered when a socket error occured.
 
|-
 
|-
| [[THttpCli.OnSocksAuthState | OnSocksAuthState]] ||||
+
| [[THttpCli.OnSocksConnected | OnSocksConnected]] |||| Triggered when connected to socks server.
 
|-
 
|-
| [[THttpCli.OnSocksConnected | OnSocksConnected]] ||||
+
| [[THttpCli.OnSocksError | OnSocksError]] |||| Triggered when a error occurs with the socks server.
 
|-
 
|-
| [[THttpCli.OnSocksError | OnSocksError]] ||||
+
| [[THttpCli.OnStateChange | OnStateChange]] |||| Triggered when component state change.
|-
 
| [[THttpCli.OnStateChange | OnStateChange]] ||||
 
|-
 
| [[THttpCli.OnTrace | OnTrace]] ||||
 
 
|}
 
|}
  

Revision as of 14:00, 2 March 2006

Main page -> ICS components reference -> THttpCli

Overview

  • unit HttpProt.pas
  • inheritance THttpCli - TComponent

THttpCli component is implementing the client side HTTP protocol described in RFC 1945 and RFC 2068. HTTP protocol is the standard protocol for browsing the World Wide Web.

Properties

Accept Mime types accepted in the reply.
AcceptLanguage Languages accepted in the reply.
AcceptRanges Ranges accepted.
Agent User agent sent to server.
AuthorizationRequest List of authentication methods.
Connection Connection type for keep-alive.
ContentLength Received document length.
ContentRangeBegin Start of requested range.
ContentRangeEnd End of requested range.
ContentType Received document mime type.
ContentTypePost Sent document mime type.
Cookie Cookies to be sent.
CtrlSocket Underlaying The underlying instance of TWSocket handles the connection and raw data exchange.
DnsResult Result of DNS request.
DocName Received document name.
FollowRelocation Tell the component o follow or not the relocations.
Handle Hidden window handle.
Hostname Hostname to which the URL point.
LastResponse Last response from server.
LocalAddr Local address to which underlaying socket is bound.
Location Where the relocation will take place.
ModifiedSince Requested modification datetime.
MultiThreaded To tell the component it runs within a thread.
NoCache Tell the server to not cache the request.
Options Options.
Protocol Protocol extracted from the URL.
Proxy Proxy to traverse to before connecting.
ProxyConnection Type of proxy connection.
ProxyPort Port to be used to connect to proxy.
RcvdCount Bytes received.
RcvdHeader Received header.
RcvdStream Stream to write received document.
ReasonPhrase Status returned by server.
Reference To send the referer to the server.
RequestVer HTTP version to be used in the request.
Sender Sender to be sent to server.
SendStream Stream to be posted.
SentCount Bytes sent.
SocksAuthentication Socks server authentication type.
SocksLevel Sockers server protocol level.
SocksPassword Socks server password.
SocksPort Socks server port.
SocksServer Socks server hostname or IP.
SocksUsercode Socks server usercode.
State Component state.
StatusCode Server status code.
TransferEncoding
URL Complete URL to act on

Methods

Abort Abort the current operation.
Close Close the current connection (synchronous).
CloseAsync Close the current connection (asynchronous).
Create Create a new component instance.
Destroy Destroy the current component instance.
Get Request an URL using GET method (synchronous).
GetASync Request an URL using GET method (asynchronous).
Head Request the header for an URL (synchronous).
HeadASync Request the header for an URL (asynchronous).
Post Request an URL using the POST method (synchronous).
PostASync Request an URL using the POST method (asynchronous).
Put Request an URL using the PUT method (synchronous).
PutASync Request an URL using the PUT method (asynchronous).

Events

OnBeforeHeaderSend Triggered before the header is sent.
OnCommand Triggered for each command sent.
OnCookie Triggered when a cookie has been received.
OnDataPush Received data outside of any request.
OnDataPush2 Received data outside of a header.
OnDocBegin Triggered when the document part is about to be received.
OnDocData Triggered for each packet of the document part.
OnDocEnd Triggered when the document is complete.
OnHeaderBegin Triggered when the first header line is about to be received.
OnHeaderData Triggered for each received header line.
OnHeaderEnd Triggered when the header has been completely received.
OnLocationChange Triggered whenever the server sent a location change.
OnRequestDone Triggered when a request is completed.
OnRequestHeaderBegin Triggered when the first header line is about to be sent.
OnRequestHeaderEnd Triggered when the last header line has been sent.
OnSendBegin Triggered before sending document part.
OnSendData Triggered when sending document part.
OnSendEnd Triggered when document has been sent completely.
OnSessionClosed Triggered when the current connection has been closed.
OnSessionConnected Triggered when the connection has been openend.
OnSocketError Triggered when a socket error occured.
OnSocksConnected Triggered when connected to socks server.
OnSocksError Triggered when a error occurs with the socks server.
OnStateChange Triggered when component state change.

How to

How to implement a timeout for THttpCli in my application?

How to implement a progress for THttpCli in my application?

How to implement a download size limitation for THttpCli in my application?



ICS Components Reference