import AbstractHttpService from 'pop-api-scraper/src/http/AbstractHttpService.js'AbstractHttpService
Extends:
Direct Subclass:
Implements:
Class for making HTTP calls.
Test:
Constructor Summary
| Public Constructor | ||
| public |
constructor(baseUrl: string, options: Object) Create a new Request object. |
|
Member Summary
| Public Members | ||
| public |
The base url of the website to scrape. |
|
| public |
The default options for the HTTP requests. |
|
| Private Members | ||
| private |
The debug function for extra output. |
|
Method Summary
| Public Methods | ||
| 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. |
|
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. |
|
Public Constructors
Public Members
Private Members
Public Methods
public delete(endpoint: string, opts: Object): Promise<Object, Error> source
Make a DELETE request.
Override:
IHttpService#deletepublic get(endpoint: string, opts: Object, raw: boolean): Promise<Object, Error> source
Make a GET request.
Override:
IHttpService#getpublic handleBody(body: string, raw: boolean): Function | string source
Handle the body response string.
public post(endpoint: string, opts: Object): Promise<Object, Error> source
Make a POST request.
Override:
IHttpService#postpublic printDebug(method: string, uri: string, opts: Object): undefined source
Print the debug message.
Manual
Reference
Source
Test
