///
interface UseFetchOptions {
alias?: string;
loadOnMount?: boolean;
bodyType?: string;
headers?: any;
body?: any;
params?: any;
}
interface FetchParams extends UseFetchOptions {
endpoint: string;
method: string;
}
export interface FetchState {
error: any;
response?: T;
rawResponse?: Response;
loading: boolean;
}
export default function useFetch({ endpoint, method, alias, loadOnMount, bodyType: bodyTypeParam, headers: headersParam, body, params, }: FetchParams): [
FetchState,
() => void,
React.MutableRefObject,
() => void
];
export declare function useGet(endpoint: string, options?: UseFetchOptions): [FetchState, () => void, import("react").MutableRefObject, () => void];
export declare function usePost(endpoint: string, options?: UseFetchOptions): [FetchState, () => void, import("react").MutableRefObject, () => void];
export declare function usePut(endpoint: string, options?: UseFetchOptions): [FetchState, () => void, import("react").MutableRefObject, () => void];
export declare function usePatch(endpoint: string, options?: UseFetchOptions): [FetchState, () => void, import("react").MutableRefObject, () => void];
export declare function useDelete(endpoint: string, options?: UseFetchOptions): [FetchState, () => void, import("react").MutableRefObject, () => void];
export {};
//# sourceMappingURL=useFetch.d.ts.map