robert
Version:
A generic shitty http client in nod.js
11 lines (10 loc) • 666 B
TypeScript
/// <reference types="node" />
import { Readable } from "stream";
export declare type Body = Readable | Buffer | string;
export declare type Key = string | number;
export declare type Value = string | number | bigint | boolean;
export declare type Query = Record<Key, Value> | Value[][] | URLSearchParams | string;
export declare type Header = Value | Value[];
export declare type Headers = Record<Key, Header>;
export declare type Methods = "GET" | "PUT" | "HEAD" | "POST" | "PATCH" | "DELETE" | "OPTIONS";
export declare type Formats = "status" | "statusText" | "headers" | "stream" | "buffer" | "bufferArray" | "text" | "json" | "arrayBuffer" | "blob";