The Source Adapter Request API provides access to an incoming HTTP request context and can be used in your controller.
A hash of parameters available from the request.
app.post("/login",{"rc_handler":"authenticate"}, function(req,resp){ var login = req.params.login; var password = req.params.password; if(someAuthFunction(login,password) === true) { resp.send(false); } else { resp.send(true); } });
Access the request headers.
req.header['Content-Type'] // 'application/json'
Returns the model name for the request.
req.model
//=> 'Product'