import type { HTTPMethodType, OAPIRequestResult } from '../types'; interface Options { /** * The body of the request. */ body?: any; /** * Object of header key to header value. */ headers?: Record; /** * Whether or not to cache. */ cache?: boolean; /** * Whether cookies will be included. Will default to true unless overridden. * "omit" is currently the fetch default {@link https://fetch.spec.whatwg.org/#concept-request-credentials-mode} * and means none will be included. * "same-origin" will include the cookies if on the same domain (this is the XmlHttpRequest default) * "include" will always include the cookies. * @defaultValue "include" */ credentials?: RequestCredentials; useXHttpMethodOverride?: boolean; /** * An AbortSignal to set request's signal. */ signal?: AbortSignal | null; } /** * Returns a rejected promise, needed to keep the promise rejected. */ export declare function convertFetchReject(url: string, body: BodyInit | undefined | null, timerId: number, error: Error): Promise; /** * Returns either a resolved or rejected Promise. * If resolved, parses the json or gets the text from the response as required. */ export declare function convertFetchSuccess(url: string, body: BodyInit | undefined | null, timerId: number, result: Response): Promise>; /** * Performs a fetch and processes the response. * All non 200 responses are converted to rejections. The body can be an object and will be JSON.stringified and the right header added. * All responses that contain JSON are converted to objects. * * @param httMethod - The http method. * @param url - The url to fetch. * @param options - (optional) */ declare function localFetch(httMethod: HTTPMethodType | Uppercase, url: string, options?: Options): Promise>; export default localFetch;