|
||||||||||
|
||||||||||
Related Syntax | Other Library Functions |
function | HttpResponseOutput |
Library: omhttp - HTTP support
Include: omhttp.xin |
define function HttpResponseOutput modifiable stream Response
This function formats the contents of a response object as a valid HTTP-formatted message and writes the entire text message to the current output. It is generally located in a server program and is used by the HttpConnectionSendResponse
function.
Argument:
Example:
define function ServiceMain ( read-only stream requestHeader, read-only stream requestBody ) as ; local variables local HttpResponse this-response ; set the message body open this-response{'entity-body'} as buffer using output as this-response{'entity-body'} do output '<html><head><title>OmniMark Service</title></head>' output '<body><h1>Welcome</h1>' output 'This site is still under construction.' output '</body></html>' done close this-response{'entity-body'} ; send Response HttpResponseOutput this-response
---- |