|
Qore RestHandler Module Reference
1.1
|
the base class for handling HTTP chunked requests and responses within the RestHandler infrastructure More...

Public Member Functions | |
| constructor (RestHandler::AbstractRestStreamRequestHandler n_stream, HttpServer::HttpListenerInterface listener, HttpServer::AbstractHttpRequestHandler handler, Socket s, hash cx, hash hdr, any 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 hash | getResponseHeaderMessageImpl () |
| private nothing | recvImpl (hash v) |
| callback method for receiving chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::recv() with the argument More... | |
| private any | 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 hash RestHandler::RestStreamRequest::getResponseHeaderMessageImpl | ( | ) |
"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 nothing RestHandler::RestStreamRequest::recvImpl | ( | hash | v | ) |
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 any RestHandler::RestStreamRequest::sendImpl | ( | ) |
callback method for sending chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::send() and returns the result