IHttpService
Direct Subclass:
Indirect Subclass:
Direct Implemented:
Indirect Implemented:
Interface to send HTTP requests.
Test:
Method Summary
Public Methods | ||
public |
Make a DELETE request. |
|
public |
Request to download an item. |
|
public |
Make a GET request. |
|
public |
Make a POST request. |
|
public |
printDebug(method: string, uri: string, opts: Object): undefined Print the debug message. |
|
public |
Make a PUT request. |
|
public |
Make a HTTP request. |
Public Methods
public delete(endpoint: string, opts: Object): Promise<Object, Error> source
Make a DELETE request.
Throw:
Using default method: 'delete' |
public download(endpoint: string, filePath: string): Promise<string, Error> source
Request to download an item.
Throw:
Using default method: 'download' |
public get(endpoint: string, opts: Object, raw: boolean): Promise<Object, Error> source
Make a GET request.
Throw:
Using default method: 'get' |
public post(endpoint: string, opts: Object): Promise<Object, Error> source
Make a POST request.
Throw:
Using default method: 'post' |
public printDebug(method: string, uri: string, opts: Object): undefined source
Print the debug message.
Throw:
Using default method: 'printDebug' |
public put(endpoint: string, opts: Object): Promise<Object, Error> source
Make a PUT request.
Throw:
Using default method: 'put' |
public request(method: string, endpoint: string, opts: Object, raw: boolean): Promise<Object, Error> source
Make a HTTP request.
Params:
Name | Type | Attribute | Description |
method | string |
|
The method of the HTTP request. |
endpoint | string |
|
The endpoint to make the HTTP request to. |
opts | Object |
|
The options for the HTTP request. |
raw | boolean |
|
Return the raw body. |
Throw:
Using default method: 'request' |