@miqro/request
v0.2.6
Published
```typescript import { request } from "@miqro/request";
Readme
@miqro/request
async wrapper for native nodejs http.request (use built-in fetch instead)
import { request } from "@miqro/request";
console.dir(await request({
url: ...,
query: {
...
},
method: ...,
headers: {
...
},
data: ...,
...
}))gzip
responses with Content-Encoding: gzip are decompressed automatically.
content-type
application/json→res.datais parsed objecttext/*→res.datais string- other →
res.datais Buffer
request body:
- object without
Content-Type→ JSON serialized,Content-Type: application/json - string →
Content-Type: text/plain - Buffer → sent as-is
