@gourmet/ufetch
v0.4.0
Published
A tiny HTTP client library that provides fetch-like API.
Downloads
3
Readme
@gourmet/ufetch
A tiny, zero-dependency fetch-like library for implementing higher level Rest API clients.
Based on node-fetch
: https://github.com/bitinn/node-fetch
Key differences from node-fetch
are:
- Much simpler API without the spec-compliance.
- Use KeepAlive agents for both http and https by default.
- Pass-through all unknown options to the underlying
http.request()
. - No sub-objects such as
Body
,Request
,Response
andHeaders
. - No binary body support such as
Blob
andArrayBuffer
. - No stream support.
- No
multipart/form-data
/FormData
support (but you can useapplication/x-www-form-urlencoded
). - No compression encoding.
- No abort signal.
- No auto-setting of
Content-Type
based onbody
type. - Only UTF-8 encoding is supported for the string body.
- No body size limit.
- No
res.clone()
. - Only
get
&has
inres.headers
.