-
del(options)
-
Performs a HTTP call with method DELETE.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
download(options, file)
-
Performs a HTTP call with method GET to download a file.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
file |
string
|
The target filename of download. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
exists(options)
-
Performs a HTTP call with method HEAD to check if the endpoint exist.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
get(options)
-
Performs a HTTP call with method GET.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
post(options, data)
-
Performs a HTTP call with method POST.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
data |
string
|
The POST data to be submitted. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
postStream(options, data, file)
-
Performs a HTTP call with method POST and get the result as a download.
This feature is like `post` and `download` combined.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
data |
string
|
The POST data to be submitted. |
file |
string
|
The target filename of download. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
put(options, data)
-
Performs a HTTP call with method PUT.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
data |
string
|
The PUT data to be submitted. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise
-
upload(options, file)
-
Performs a HTTP call with method POST to upload a file.
Parameters:
Name |
Type |
Description |
options |
string
|
The options object. |
file |
string
|
The file to be uploaded. |
Returns:
A promise that will resolve with the HTTP response.
-
Type
-
Promise