Y.mojito.lib.REST Class
The Rest module for Mojito provides an easy way to make RESTful calls to URLs without messing about with Y.io.
Methods
DELETE
-
url -
params -
config -
callback
Makes a RESTful DELETE request to specified URL
Parameters:
-
urlStringRESTful URL to hit.
-
paramsObjectparameters to add to the request.
-
configObjectmay contain 'headers' or 'timeout' values.
-
callbackFunctioncalled with response or error.
GET
-
url -
params -
config -
callback
Makes a RESTful GET request to specified URL
Parameters:
-
urlStringRESTful URL to hit.
-
paramsObjectparameters to add to the request.
-
configObjectmay contain 'headers' or 'timeout' values.
-
callbackFunctioncalled with response or error.
HEAD
-
url -
params -
config -
callback
Makes a RESTful HEAD request to specified URL
Parameters:
-
urlStringRESTful URL to hit.
-
paramsObjectparameters to add to the request.
-
configObjectmay contain 'headers' or 'timeout' values.
-
callbackFunctioncalled with response or error.
POST
-
url -
params -
config -
callback
Makes a RESTful POST request to specified URL
Parameters:
-
urlStringRESTful URL to hit.
-
paramsObjectparameters to add to the request.
-
configObjectmay contain 'headers' or 'timeout' values.
-
callbackFunctioncalled with response or error.
PUT
-
url -
params -
config -
callback
Makes a RESTful PUT request to specified URL
Parameters:
-
urlStringRESTful URL to hit.
-
paramsObjectparameters to add to the request.
-
configObjectmay contain 'headers' or 'timeout' values.
-
callbackFunctioncalled with response or error.
