Sending the Response

From RAD Studio
Jump to: navigation, search

Go Up to Creating HTTP Response Messages


If you are sure there is no more work to be done in response to a request message, you can send a response directly from an Web.HTTPApp.TWebActionItem.OnAction event handler. The response object provides two methods for sending a response: SendResponse and SendRedirect. Call SendResponse to send the response using the specified content and all the header properties of the TWebResponse object. If you only need to redirect the Web client to another URI, the SendRedirect method is more efficient.

If none of the event handlers send the response, the Web application object sends it after the dispatcher finishes. However, if none of the action items indicate that they have handled the response, the application will close the connection to the Web client without sending any response.

See Also