UNPKG

@ace-fetch/uni-app

Version:

uni-app adapter for @ace-fetch/core.

25 lines (24 loc) 1.35 kB
/// <reference types="@dcloudio/types" /> import { InterceptorManager } from './interceptorManager'; import type { FetchClient, RequestConfig, Response } from '@ace-fetch/core'; export declare class UinAppClient implements FetchClient { private defaults; interceptors: { request: InterceptorManager<RequestConfig<any>>; response: InterceptorManager<Response<any>>; }; constructor(defaults: Partial<RequestConfig>); request<T = any, R = Response<T>>(url: string, config?: RequestConfig): Promise<R>; request<T = any, R = Response<T>>(config: RequestConfig): Promise<R>; get<T = any, R = Response<T>>(url: string, config?: RequestConfig): Promise<R>; delete<T = any, R = Response<T>>(url: string, config?: RequestConfig): Promise<R>; head<T = any, R = Response<T>>(url: string, config?: RequestConfig): Promise<R>; options<T = any, R = Response<T>>(url: string, config?: RequestConfig): Promise<R>; post<T = any, R = Response<T>>(url: string, data?: any, config?: RequestConfig): Promise<R>; put<T = any, R = Response<T>>(url: string, data?: any, config?: RequestConfig): Promise<R>; patch<T = any, R = Response<T>>(url: string, data?: any, config?: RequestConfig): Promise<R>; } declare module '@ace-fetch/core' { interface RequestConfig extends UniNamespace.RequestOptions { } }