Indy 9
|
TIdHTTPProtocol = class(TObject)
property Request: TIdHTTPRequest;
property Response: TIdHTTPResponse;
procedure BuildAndSendRequest(AURI: TIdURI);
BuildAndSendRequest also generates the HTTP request message packet, including header values, and writes the values using the connection for the TIdHTTP client. BuildAndSendRequest is called from ConnectToHost.
constructor Create(AConnection: TIdCustomHTTP);
destructor Destroy; override;
function ProcessResponse: TIdHTTPWhatsNext;
ProcessResponse allows the protocol handler to detect and response to various conditions that include :
ProcessResponse is used when the HTTP client attempts to connect to the remote server to perform an HTTP request or receive an HTTP response. The TIdHTTPWhatsNext return value for ProcessResponse is updated often during execution of the method based on the numeric HTTP result codes or exceptions encountered during the request/response protocol exchange.
procedure RetrieveHeaders;
RetrieveHeaders repeatedly calls ReadLn until no more header data is available on the HTTP client connection, or an EIdConnClosedGracefully is raised. If an exception is raised, the HTTP client connection is closed. When all headers have been read from the client, RetrieveHeaders calls Response.ProcessHeaders to move the read headers to their corresponding properties.