import { Id } from "../types/Id.js"; import { Optional } from "../types/Types.js"; import { Enum } from "../types/Enum.js"; import { PageOptions } from "../types/PageList.js"; import { Text } from "../types/Text.js"; import { ContentType } from "./ContentType.js"; import { CacheAge } from "../types/CacheAge.js"; //#region src/http/RequestOptions.d.ts export declare const toPageOptions: (options?: RequestOptions | PageOptions) => Optional; export declare class RequestOptions extends Enum { readonly type: ContentType; readonly headers: { [key: string]: any; }; pageOptions?: PageOptions | undefined; requestOptions: { maxRedirects?: number; validateStatus?: (status: number) => boolean; timeout?: CacheAge; }; constructor(type?: ContentType, headers?: { [key: string]: any; }, pageOptions?: PageOptions | undefined); static get Form(): RequestOptions; static get Json(): RequestOptions; static get Stream(): RequestOptions; static get Text(): RequestOptions; static get Xml(): RequestOptions; page: (options: PageOptions) => this; authorization: (auth: string) => this; apiKey: (apiKey: string) => this; setHeader: (key: Text, value: Id | boolean) => this; setHeaderUnlessPresent: (key: string, value?: Id | boolean) => this; accept: (type: ContentType) => this; bearer: (jwt: Text) => this; basic: (username: Text, password: Text) => this; maxRedirects: (max?: number) => this; validateStatus: (validate?: (status: number) => boolean) => this; timeout: (t?: CacheAge) => this; } export declare const isRequestOptions: (o?: unknown) => o is RequestOptions; //#endregion //# sourceMappingURL=RequestOptions.d.ts.map