519 abstract string name();
554 private hash unknownSubClassError(
string n_name);
576 "body":
"not implemented",
585 "OPTIONS":
"options",
589 const MimeDataTypes = (
591 "serialize": \make_json(),
592 "deserialize": \parse_json(),
595 "serialize": \make_yaml(),
596 "deserialize": \parse_yaml(),
600 "serialize": \make_yaml(),
601 "deserialize": \parse_yaml(),
604 "serialize": \make_xmlrpc_value(),
605 "deserialize": \parse_xmlrpc_value(),
608 "serialize":
string (any body) {
return sprintf(
"<pre>%N</pre>", body); },
656 hash handleRequest(HttpListenerInterface listener, Socket s,
hash cx,
hash hdr, *data b);
660 removeRootPath(reference path);
664 requestDeserializationError(
hash hdr,
hash cx,
string body);
676 logError(
string fmt);
680 logDebug(
string fmt);
692 static hash makeResponse(
int code, any body, *
hash hdr);
string sprintf(string fmt,...)
hash ch
class hash: name -> AbstractRestClass
Definition: RestHandler.qm.dox.h:616
*int getTimeout()
returns the timeout in milliseconds or NOTHING if no timeout is set
streamError(hash n_ex)
registers stream errors in the send operation with the stream handler if no error is already present ...
hash cx
call context hash
Definition: RestHandler.qm.dox.h:335
the RestHandler namespace contains all the objects in the RestHandler module
Definition: RestHandler.qm.dox.h:317
abstract any sendImpl()
abstract callback method for sending chunked data
nothing recv(hash v)
this method provides the callback method for receiving chunked data by calling recvImpl() ...
*hash ah
call argument hash
Definition: RestHandler.qm.dox.h:341
the base abstract class for REST stream request handlers
Definition: RestHandler.qm.dox.h:326
the base abstract class for REST handler classes
Definition: RestHandler.qm.dox.h:508
the base class for handling HTTP chunked requests and responses within the RestHandler infrastructure...
Definition: RestHandler.qm.dox.h:455
*int timeout_ms
socket I/O timeout in milliseconds
Definition: RestHandler.qm.dox.h:347
hash getResponseHeaderMessage()
this method returns the response message description hash by calling getResponseHeaderMessageImpl() ...
*code getPersistentClosedNotification()
returns a callable value in case a persistent connection is in progress; NOTHING if not; this method ...
bool isPersistent()
returns True if the connection is persistent; this method in the base class returns False by default ...
abstract hash getResponseHeaderMessageImpl()
this method should return the response message description hash
*hash ex
if an exception is raised in a callback then the exception hash is saved here
Definition: RestHandler.qm.dox.h:338
hash rhdr
headers to add in the response
Definition: RestHandler.qm.dox.h:344
abstract nothing recvImpl(hash v)
abstract callback method for receiving chunked data
any send()
this method provides the callback method for sending chunked data by calling sendImpl() ...
constructor(hash n_cx, *hash n_ah)
creates the object with the given arguments
setTimeout(timeout n_timeout_ms)
sets the internal socket I/O timeout value in ms