import { StringMap } from "../types";
export { isFileType, isAbsoluteUrl, joinPaths, buildParameterString, createUrl, } from "./lib";
export { Service, IServiceMiddleware, IServiceOptions } from "./service";
export declare type HttpFieldContent = string | number | boolean | any[] | object;
interface HttpRequestConfigRetry {
    maxAttempts: number;
    attemptTimeout: number;
}
export interface IHttpRequestConfig extends RequestInit {
    baseUrl?: string;
    method?: "GET" | "POST" | "DELETE" | "HEAD" | "PUT" | "PATCH";
    /**
     * Adds timestamp as parameter to request
     *
     * @type {boolean}
     * @memberof IHttpRequestConfig
     */
    addTimestamp?: boolean;
    /**
     * Provide parameters that should be attached to request url
     *
     * @type {StringMap<HttpFieldContent>}
     * @memberof IHttpRequestConfig
     */
    params?: StringMap<HttpFieldContent>;
    headers?: StringMap<string>;
    body?: RequestInit["body"] | any;
    json?: boolean | "auto";
    retry?: HttpRequestConfigRetry;
}
export declare const get: (url: string, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<any>;
export declare const getJSON: <T = any>(url: string, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<T>;
export declare const post: (url: string, body?: any, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<any>;
export declare const del: (url: string, body?: any, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<any>;
export declare const put: (url: string, body?: any, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<any>;
export declare const patch: (url: string, body?: any, options?: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "json" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal"> | undefined) => Promise<any>;
export declare const request: (url: string, options: IHttpRequestConfig) => Promise<any>;
declare const _fetch: (url: string, options: Pick<IHttpRequestConfig, "window" | "params" | "addTimestamp" | "baseUrl" | "headers" | "method" | "body" | "retry" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal">) => Promise<Response>;
export { _fetch as fetch };
