@knowmax/http-utils
Version:
HTTP utilities for headers, content types, and common HTTP operations
13 lines (12 loc) • 436 B
TypeScript
export declare const headers: (initial?: Record<string, string>) => Headers;
declare class Headers {
private headers;
constructor(initial?: Record<string, string>);
withBearer(token: string): this;
withLanguage(language?: string): this;
withContentTypeJson(): this;
withContentType(contentType: string): this;
withHeader(key: string, value?: string): this;
export(): Record<string, string>;
}
export {};