Skip to content

Requests

Mathias Quintero edited this page Mar 18, 2016 · 1 revision

Requests

All your methods get called with a special Request object. Here is what you can do with it:

Get Authentication Data

If you need to access that info from the method you can at all times get them directly:

var username = request.getUsername();
var password = request.getPassword();

Get Parameters

You can get any parameter that may be embedded into the url.

var query = request.getParameter('query');

Get the body of the Message

To get the body of the message (Should only be used for POST) there's the .getBody function

var data = request.getBody();

Get the original request Object

For those who know Node better, you can also directly handle the regular http response object:

var req = request.getRequestObject();
Clone this wiki locally