Page tree

Have questions? Stuck? Please check our FAQ for some common questions and answers.

Skip to end of metadata
Go to start of metadata

RestService

RestService is an Angular Factory in the Remote module with the name rest.js. It provides functions to make RESTful calls to the server using the $http service. To use these functions, see the documentation on injecting Angular services.

NameSummary
getMake a RESTful GET request.
postMake a RESTful POST request.

Function Descriptions

get

Make a RESTful GET request.

Example UsageArgumentsReturn Value
rs.get(url, callback, errorCb);

url - the path to be used in the rest call (see UrlFnService for path information)

callback - function reference to be executed upon success

errorCb - function reference to be executed upon error

none

post

Make a RESTful POST request. (This function is experimental.)

Example UsageArgumentsReturn Value
rs.post(url, data, callbacks);

url - the path to be used in the rest call (see UrlFnService  for path information)

data - the data you want to POST to the server

callbacks - object containing:

success: <function reference to be executed on success>

error: <function reference to be executed on error>

none
  • No labels