TIdHTTPServerOnCommand Get

Event handler signalled for HTTP server GET, POST, and HEAD requests. property OnCommandGet; Parameters AThread

The peer thread generating the event. RequestInfo

The request object reference. ResponseInfo The response object reference. Description

OnCommandGet is the TldHTTPGetEvent [¿3 event handler used to respond to events generated for the HTTP server GET, POST, and HEAD commands. OnCommandGet is published in TIdHTTPServer |7j], and is used during execution of the client thread to form an HTTP response to the HTTP request from the client connection.

The server implementation may assign a procedure to the OnCommandGet event handler to allow the server to respond to the HTTP commands. Note: When OnCommandGet is unassigned, the HTTP request will be read from the client connection and an

HTTP prototcol error will be sent in the HTTP reponse.

OnCommandGet can be used to manipulate properties and methods of the Requestlnfo and Responselnfo parameters prior to allowing the server to send [C] the response to the HTTP client.

Was this article helpful?

+1 0

Post a comment