420 abstract string name();
477 "body":
"not implemented",
486 "OPTIONS":
"options",
490 const MimeDataTypes = (
492 "serialize": \makeJSONString(),
493 "deserialize": \parseJSON(),
496 "serialize": \makeYAML(),
497 "deserialize": \parseYAML(),
501 "serialize": \makeYAML(),
502 "deserialize": \parseYAML(),
505 "serialize": \makeXMLRPCValueString(),
506 "deserialize": \parseXMLRPCValue(),
509 "serialize":
string (any $body) {
return sprintf(
"<pre>%N</pre>", $body); },
527 constructor(*AbstractAuthenticator auth);
557 hash handleRequest(HttpListener listener, Socket s,
hash cx,
hash hdr, *data b);
561 removeRootPath(reference path);
565 requestDeserializationError(
hash hdr,
hash cx,
string body);
569 responseSerializationError(
hash cx, *
hash aih,
hash rv);
577 logError(
string fmt);
581 logDebug(
string fmt);
589 static hash makeResponse(
int code, any body, *
hash hdr);
string sprintf(string fmt,...)
hash ch
class hash: name -> AbstractRestClass
Definition: RestHandler.qm.dox.h:517
constructor(hash cx, *hash ah)
creates the object with the given arguments
the RestHandler namespace contains all the objects in the RestHandler module
Definition: RestHandler.qm.dox.h:310
AbstractHttpRequestHandler handler
private nothing recvImpl(hash v)
callback method for receiving chunked data; this calls RestHandler::AbstractRestStreamRequestHandler:...
hash handleRequest(HttpListener listener, RestHandler rh, Socket s, *list cl, string mn, hash cx, *hash args)
this method is called by the RestHandler class to match the right object with incoming requests ...
*AbstractRestClass subClass(string name, hash cx, *hash args)
this method will be called to find a sub-class (ie with GET /invoices/1 - if this class represents "i...
*hash ah
call argument hash
Definition: RestHandler.qm.dox.h:321
the base abstract class for REST stream request handlers
Definition: RestHandler.qm.dox.h:312
the base abstract class for REST handler classes
Definition: RestHandler.qm.dox.h:409
private hash getResponseHeaderMessageImpl()
the base class for handling HTTP chunked requests and responses within the RestHandler infrastructure...
Definition: RestHandler.qm.dox.h:360
hash getResponseHeaderMessage()
this method returns the response message description hash by calling getResponseHeaderMessageImpl() ...
private any sendImpl()
callback method for sending chunked data; this calls RestHandler::AbstractRestStreamRequestHandler::s...
abstract string name()
this provides the name of the REST class
private hash dispatchStream(HttpListener listener, RestHandler rh, Socket s, string mn, *hash ah, hash cx)
this method is called to dispatch streamed requests on the given object
private hash unknownSubClassError(string name)
throws a "REST-CLASS-ERROR" exception when a request tries to access an unknown subclass ...
private hash dispatch(RestHandler rh, string mn, *hash ah, hash cx)
this method is called to dispatch requests on the given object
hash rhdr
headers to add in the response
Definition: RestHandler.qm.dox.h:324
constructor(RestHandler::AbstractRestStreamRequestHandler rsh, HttpListener listener, AbstractHttpRequestHandler handler, Socket s, hash cx, hash hdr, any body)
creates the object with the given attributes