import type { ErrorOr } from './types.js'; export interface Header { name: string; value: string; } export type NameValueHeaderInput = Header; export type NamePartsHeaderInput = { name: string; parts: HeaderInputValuePart[]; }; export type HeaderInput = NameValueHeaderInput | NamePartsHeaderInput; export type HeaderInputConstantValuePart = { kind: 'Constant'; value: string; }; export type HeaderInputVariableValuePart = { kind: 'Variable'; value: string; name: string; }; export type HeaderInputValuePart = HeaderInputConstantValuePart | HeaderInputVariableValuePart; export declare const HEADER_REGEX: RegExp; /** * Parse a header string according to https://curl.se/docs/manpage.html#-H * and https://datatracker.ietf.org/doc/html/rfc2616#section-4.2 * * @param {*} header a curl header string, e.g. `"api-key: asfdasdfad"` * @returns {*} a name/value record or * `null` for the `Header:` notation that means "remove this header" in * the curl spec or a error object if cannot parse the string. */ export declare const parseHeader: (header: string) => ErrorOr
; //# sourceMappingURL=header.d.ts.map