0.0.1 • Published 1 year ago
@krave/fixed-got v0.0.1
A very simplified version of got
Usage
const fixedGot = require("fixed-got")
const result = await fixedGot(URL, time_limit, retry_interval, time_origin).josn()
Purpose of this lib
It uses a very simple mechanism to do retry based on got
if an error.
The time we start the request is time_origin
, and we order the request must finish in the time_limit
even if any errors. And with the help of retry_interval
, we can set how long to wait for the next retry.
Parameters
URL
time_limit
Requiredretry_interval
Optional. Defaults to1000
time_origin
Optional. Defaults toperformance.now()
0.0.1
1 year ago