import { Omit } from "../types";
import { IHttpRequestConfig } from ".";
export interface IServiceMiddleware {
    (url: string, options: IServiceRequestConfig, next: (url: string, options: IServiceRequestConfig) => Promise<any>): Promise<any>;
}
export interface IServiceOptions {
    middlewares?: IServiceMiddleware[];
    baseUrl?: string;
    defaults?: IHttpRequestConfig;
}
export interface IServiceRequestConfig extends IHttpRequestConfig {
}
export declare class Service {
    private defaults;
    private baseUrl;
    private middlewares;
    constructor(options?: IServiceOptions);
    get(url: string, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<any>;
    getJSON<T>(url: string, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<T>;
    post(url: string, body?: any, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<any>;
    del(url: string, body?: any, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<any>;
    put(url: string, body?: any, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<any>;
    patch(url: string, body?: any, options?: Omit<IServiceRequestConfig, "method" | "body">): Promise<any>;
    request(url: string, options: IServiceRequestConfig): Promise<any>;
}
