miqro · @miqro/core · @miqro/parser · @miqro/query · @miqro/jsx · @miqro/jsx-dom · @miqro/jsx-node · @miqro/request · @miqro/runner · @miqro/test · @miqro/test-http

@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

request body: