0.0.1 • Published 3 years 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
URLtime_limitRequiredretry_intervalOptional. Defaults to1000time_originOptional. Defaults toperformance.now()
0.0.1
3 years ago