http

Methods

(inner) extractResponseBody(response) → {string}

Extract the response body from a response. Make to check that the response has a body before this.

Source:
Parameters:
Name Type Description
response object

HTTP response object

Returns:
Type:
string

http response body

(inner) processResponse(response, payload, url) → {string/object}

Source:
Parameters:
Name Type Description
response object

HTTP response object

payload string

body of the HTTP request

url string

URL the request was made to

Returns:
Type:
string/object

http response body. If no body the response object itself.

(inner) request(url, httpArguments, rejectionText, maxRetries, backoff) → {object}

Generalize making http requests with node fetch retry failed requests with exponential backoff

Source:
Parameters:
Name Type Description
url string

the request url

httpArguments object

{ method The HTTP method e.g POST or GET; default GET, headers HTTP request headers, body The request payload/HTTP request body }

rejectionText string
maxRetries int

Number of times to retry a failed request; default 3

backoff Integer
Returns:
Type:
object

http response object