Skip to content

GET

WARNING

This API is frozen and deprecated. Please use the fluent API from 0.9.4 on

Sends a GET request to a URL.

This method is typically used once in your client application, to get the root resource. Once you have the root resource and its links, you access the rest of the API by following those links.

Signature

The method signature for GET is:

parameterdescription
urlthe URL or path to the resource you want to GET, defaults to '/'
headers(optional) add to or override the default headers.
learn more
-> returnsthe JSON from the payload of the response to this request

Examples

This is the usual way to use get() - to GET the root resource from which you will follow links to other resources or affordances.

This next example is non-standard, but shows what to do if you have multiple roots in multiple locations:

Released under the MIT License.

Released under the MIT License.