HttpService
Extends:
Indirect Implements:
Class for making HTTP calls with the got library.
Test:
Method Summary
| Public Methods | ||
| public | Request to download an item. | |
| public | Make a HTTP request. | |
Inherited Summary
| From class IHttpService | ||
| 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. | |
| From class AbstractHttpService | ||
| public | The base url of the website to scrape. | |
| public | The default options for the HTTP requests. | |
| private | The debug function for extra output. | |
| public | Make a DELETE request. | |
| public | Make a GET request. | |
| public | handleBody(body: string, raw: boolean): Function | string Handle the body response string. | |
| public | Make a POST request. | |
| public | printDebug(method: string, uri: string, opts: Object): undefined Print the debug message. | |
| public | Make a PUT request. | |
Public Methods
public download(endpoint: string, filePath: string): Promise<string, Error> source
Request to download an item.
Override:
IHttpService#downloadpublic request(method: string, endpoint: string, opts: Object, raw: boolean): Promise<Object, Error> source
Make a HTTP request.
Override:
IHttpService#requestParams:
| 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. | 
 Manual
  Reference
  Source
  Test
  Manual
  Reference
  Source
  Test
   
    
  