|
Qore RestHandler Module Reference
0.1
|
the base abstract class for REST handler classes More...

Public Member Functions | |
| hash | handleRequest (RestHandler rh, *list cl, string mn, hash cx, *hash args) |
| this method is called by the RestHandler class to match the right object with incoming requests | |
| abstract string | name () |
| this provides the name of the REST class | |
| *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 "invoices", then subClass("1") will be called to return invoice 1; return NOTHING if the object doesn't exist More... | |
Private Member Functions | |
| hash | dispatch (RestHandler rh, *string oname, string mn, *hash ah, hash cx) |
| this method is called to dispatch requests on the given object | |
| hash | unknownSubClassError (string name) |
throws a "REST-CLASS-ERROR" exception when a request tries to access an unknown subclass | |
the base abstract class for REST handler classes
| *AbstractRestClass RestHandler::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 "invoices", then subClass("1") will be called to return invoice 1; return NOTHING if the object doesn't exist
| name | the name of the subclass |
| cx | call context hash; this hash will have the following keys:
|
| args | any URI arguments in the request |
name argument or NOTHING if none can be matched