UNPKG

portals

Version:

Client-side HTTP requests with middleware support.

10 lines (9 loc) 417 B
import { Request, Middleware } from "./"; export declare type WithHeaderValue<Req> = string | string[] | { (request: Req): string | string[]; }; /** * Add a header to the request that can either override, or be overridden * by, the headers in the request. */ export declare function withHeader<Req extends Request = Request>(name: string, value: WithHeaderValue<Req>, override?: boolean): Middleware;