Qore RestHandler Module Reference
1.5.2
|
the base class for handling HTTP chunked requests and responses within the RestHandler infrastructure More...
Public Member Methods | |
constructor (RestHandler::AbstractRestStreamRequestHandler n_stream, HttpServer::HttpListenerInterface listener, HttpServer::AbstractHttpRequestHandler handler, Socket s, hash< auto > cx, hash< auto > hdr, auto body) | |
creates the object with the given attributes | |
destructor () | |
destroys the object and updates the request handler about the status of the persistent connection | |
Private Member Methods | |
hash< HttpServer::HttpHandlerResponseInfo > | getResponseHeaderMessageImpl () |
nothing | recvImpl (hash< auto > v) |
callback method for receiving chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::recv() with the argument More... | |
auto | sendImpl () |
callback method for sending chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::send() and returns the result More... | |
the base class for handling HTTP chunked requests and responses within the RestHandler infrastructure
|
private |
"code"
: the HTTP return code (see HttpServer::HttpCodes)"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"close"
: (optional) set this key to True if the connection should be unconditionally closed when the handler returns"hdr"
: (optional) set this key to a hash of extra header information to be returned with the response
|
private |
callback method for receiving chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::recv() with the argument
v | the first time this method is called with a hash of the message headers in the "hdr" key, and then with any message body in the "data" ; if a chunked HTTP message is received, then this method is called once for each chunk; when the message has been received, then this method is called with a hash representing any trailer data received in a chunked transfer or NOTHING if the data was received in a normal message body or if there was no trailer data in a chunked transfer. The argument to this callback is always a hash; data calls have the following keys:
|
|
private |
callback method for sending chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::send() and returns the result