jquery-nor-rest
jQuery REST client plugin for Sendanor REST APIs
Usage
First make sure you include our jQuery plugin file jquery.nor.rest.js
.
Fetching data with GET requests
When /api
returns:
"$ref": "http://zeta3-lts-local:3000/api" "profile": "$ref": "http://zeta3-lts-local:3000/api/profile" "username": "foo"
...and /api/profile
returns:
"$ref": "http://zeta3-lts-local:3000/api/profile" "username": "foo" "email": "foo@example.com"
Then you can call $.nor.rest.get(url[, params])
like this:
$norrest;
Changing the data with POST request
In this example the POST handler redirects the user back to /api/profile
:
$norrest;