Recommend this page to a friend! |
Classes of Elger van Boxtel | JS Rest Client | README.md | Download |
|
|
DownloadJSRestJavascript REST API to communicate with the backend Fork me on GitHub https://github.com/elgervb/JSRest Usage
Request TypesThe Rest library supplies a number of default requests:
Apart from those, you can always create your own with the Request Options| Key | Type | Default | Description |
|-------------|---------------|:--------------------------------:|--------------------------------|
| url | string | | The request url. If you're set the baseurl on the Rest object then the url will be appended |
| headers | object |{} | Any additional headers to supply to the backend |
| xhrFields | object | {withCredentials: false} | Any additional field to extend the XmlHttpRequest with |
| debug | boolean | false | Whether to run in debug mode for additional console logging |
| type | string | GET | The request type. Only set this when using the |