The request : g.req¶
Custom APIs, hooks, events and schedulers read the request through g.req. Who calls is in g.req.auth : see Who calls : g.req.auth.
Body¶
To get the value of request body, use g.req.body.
Headers¶
To get the value of requested headers, use g.req.headers.
The tenant header of a request of a tenant of a multi-tenant instance. g.req.params.tenantUsername holds the tenant too, also when the request named it in the path (crm::acme).
Params¶
To get the value of requested params, use g.req.params.
The tenant of the request, for a multi-tenant instance: named with the x-am-tenant-username header, or in the path of an API of the instance (crm::acme).
Query params¶
To get the value of requested query params, use g.req.query.
Event data¶
To get the value of requested body data of the event, use g.req.eventData.