Qore HttpServerUtil Module Reference  0.9.4
HttpServer::HttpResponseInfo hashdecl Reference

the return value of HTTP handler methods where any message body has been serialized for sending over the HTTP socket More...

Public Attributes

*data body
 the message body to return in the response More...
 
*InputStream chunked_body
 the message body to return in the response as a chunked response More...
 
softbool close = False
 set this key to True if the connection should be unconditionally closed when the handler returns
 
int code
 the HTTP return code (see HttpServer::HttpCodes for possible values)
 
string errlog
 a string can be returned here which will be logged in the HTTP server's error log file (if any)
 
*hash< auto > hdr
 set this key to a hash of extra header information to be returned with the response
 
string log
 a string can be returned here which will be logged in the HTTP server's log file (if any)
 
bool reply_sent = False
 this key can be set to True if the reply has already been sent (by a chunked callback for example)
 

Detailed Description

the return value of HTTP handler methods where any message body has been serialized for sending over the HTTP socket

Member Data Documentation

◆ body

*data HttpServer::HttpResponseInfo::body

the message body to return in the response

if this key is returned, then the reply is sent immediately; a chunked reply is not made, and send() and sendImpl() are not called

Note
if both body and chunked_body are set, then body is used, anc chunked_body is ignored

◆ chunked_body

*InputStream HttpServer::HttpResponseInfo::chunked_body

the message body to return in the response as a chunked response

if this key is returned, then the reply is sent immediately; a chunked reply is not made, and send() and sendImpl() are not called

Note
if both body and chunked_body are set, then body is used, anc chunked_body is ignored