Qore HttpServerUtil Module Reference 1.1
Loading...
Searching...
No Matches
HttpServer::HttpHandlerResponseInfo hashdecl Reference

the return value of HTTP handler methods with potentially unserialized message bodies More...

#include <HttpServerUtil.qm.dox.h>

Public Attributes

auto body
 the message body to return in the 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 More...
 
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)
 
*hash< auto > user_state
 additional info to be added to the context (cx) variable's user_state key if the connection is not closed
 

Detailed Description

the return value of HTTP handler methods with potentially unserialized message bodies

Member Data Documentation

◆ body

auto HttpServer::HttpHandlerResponseInfo::body

the message body to return in the response

For higher-level handlers this can be any data type that will later be serialized for sending over the HTTP socket

◆ hdr

*hash<auto> HttpServer::HttpHandlerResponseInfo::hdr

set this key to a hash of extra header information to be returned with the response

Note
The default NullRestSchemaValidator class will try use any Content-Type header if set here to serialize the response if the MIME type is supported and acceptable by the client