@tnhb/kits
Version:
TNHB Kits 请求工具 SDK By blak-kong
19 lines (18 loc) • 964 B
TypeScript
/// <reference types="node" />
import { HttpDelegate } from './HttpKit';
/**
* @author blak-kong
* @copyright blak-kong@foxmail.com
* @description 使用 Axios 实现网络请求
*/
export declare class AxiosHttpKit implements HttpDelegate {
httpGet(url: string, options?: any): Promise<any>;
httpGetToResponse(url: string, options?: any): Promise<any>;
httpPost(url: string, data: string, options?: any): Promise<any>;
httpPostToResponse(url: string, data: string, options?: any): Promise<any>;
httpPutToResponse(url: string, data: string, options?: any): Promise<any>;
httpDeleteToResponse(url: string, options?: any): Promise<any>;
httpPostWithCert(url: string, data: string, certFileContent: Buffer, passphrase: string): Promise<any>;
upload(url: string, filePath: string, params?: string): Promise<any>;
uploadToResponse(url: string, filePath: string, params?: string, options?: any): Promise<any>;
}