tiny-request
- a tiny http.request wrapper, useful for some http sdk modules.
usage
-
options: same to http.request options, add
timeout
,source
,body
,dest
support- timeout: type
{Number}
- source: type
{String} - filepath
|{Stream}
|{Buffer}
, will pipe to req - body: http body, type
{Buffer}
|{String}
|{Object}
- dest: filepath pipe from the res,
{String}
- rawBody: options pass to raw-body
- timeout: type
-
res: type
object
- status
- headers
- body
let request = let result = await
License
MIT