Methods
delete(urlOrOptions, optionsopt) → {Promise}
Send a DELETE request to a resource
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of DELETE args |
|||||||||
options |
Object |
<optional> |
optional settings for the DELETE operation Properties
|
Returns:
- Type
- Promise
get(urlOrOptions, optionsopt) → {Promise}
Send a GET request to a resource (result must be application/json)
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of GET args |
|||||||||
options |
Object |
<optional> |
optional settings for the GET operation Properties
|
Returns:
- Type
- Promise
head(urlOrOptions, optionsopt) → {Promise}
Send a HEAD request to a resource
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of HEAD args |
|||||||||
options |
Object |
<optional> |
optional settings for the HEAD operation Properties
|
Returns:
- Type
- Promise
patch(urlOrOptions, optionsopt) → {Promise}
Send a PATCH request to a resource with payload
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of PATCH args |
|||||||||
options |
Object |
<optional> |
optional settings for the PATCH operation Properties
|
Returns:
- Type
- Promise
post(urlOrOptions, optionsopt) → {Promise}
Send a POST request to a resource with payload
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of POST args |
|||||||||
options |
Object |
<optional> |
optional settings for the POST operation Properties
|
Returns:
- Type
- Promise
put(urlOrOptions, optionsopt) → {Promise}
Send a PUT request to a resource with payload
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
urlOrOptions |
String | Object | the url to request, or an object of PUT args |
|||||||||
options |
Object |
<optional> |
optional settings for the PUT operation Properties
|
Returns:
- Type
- Promise