node-commons-http
This is a abstract implementation for a generic http requests api, which can be backed by different implementations. Like got, request, node-fetch or others.
The default implementation is uses got package.
Install
npm i commons-http got
Usage
; let httpFactory = await HttpFactory;let http:IHttp = httpFactory; // use as promiselet resp:IHttpResponse<any> = await http;console // use as streamlet stream:IHttpStream<any> = http;stream; await stream