Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
16 lines
664 B
Plaintext
16 lines
664 B
Plaintext
//#region src/types/request.d.ts
|
|
type HttpMethod = 'GET' | 'SEARCH' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
interface RequestOptions {
|
|
path: string;
|
|
method?: HttpMethod;
|
|
params?: Record<string, any>;
|
|
headers?: Record<string, string>;
|
|
body?: string | FormData;
|
|
onRequest?: RequestTransformer;
|
|
onResponse?: ResponseTransformer;
|
|
}
|
|
type RequestTransformer = (options: RequestInit) => RequestInit | Promise<RequestInit>;
|
|
type ResponseTransformer<Output = any> = (data: any, request: RequestInit) => Output | Promise<Output>;
|
|
//#endregion
|
|
export { HttpMethod, RequestOptions, RequestTransformer, ResponseTransformer };
|
|
//# sourceMappingURL=request.d.cts.map |