UNPKG

simple-queries-react

Version:

Simple Queries React: Streamlined requests, powerful results. Transform your API calls into something simple, fast, and scalable with just a few lines of code.

22 lines (21 loc) 774 B
import { AnyObject, FetchHeaders, UseRequestHook } from "../@types"; export declare function usePost<T, B = AnyObject, P = AnyObject>(props?: UseRequestHook<T> | string | undefined | AnyObject): { getResponse: () => T | undefined; send: (data?: string | number | AnyObject | B | (Partial<Partial<{ bodyURLSearchParams: AnyObject; body: B; pathRest: AnyObject; params: P; }>> & { bodyURLSearchParams: AnyObject; }) | undefined) => void; clearResponse: () => void; isLoading: () => boolean; cancelLoading: () => void; getErrors: () => any; clearErrors: () => void; setHeaders: (headers: FetchHeaders) => void; success: boolean; error: boolean; msgErrors: any; };