@jikey/fcazero
Version:
Facebook Messenger bot, and is one of the most advanced next-generation Facebook Chat API (FCA)
24 lines (21 loc) • 1.24 kB
TypeScript
import * as axios from 'axios';
import { CookieJar } from 'tough-cookie';
import { AdaptedResponse, RequestFunction, GetOptions, PostForm } from '../types/utils/axios.js';
import { CustomHeader } from '../types/utils/headers.js';
import { Ctx } from '../types/global.js';
import 'emittery';
import 'mqtt';
declare class Axios {
static jar: CookieJar;
static client: axios.AxiosInstance;
static proxyConfig: {};
static adaptResponse(res: any): AdaptedResponse;
static requestWithRetry<T = any>(requestFunction: RequestFunction<T>, retries?: number): Promise<AdaptedResponse>;
static setProxy(proxyUrl: string | undefined): void;
static cleanGet(url: string): Promise<AdaptedResponse>;
static get(url: string, _: CookieJar, qs?: Record<string, any>, options?: GetOptions, ctx?: Ctx, customHeader?: CustomHeader): Promise<AdaptedResponse>;
static post(url: string, _: CookieJar, form: PostForm, options?: GetOptions, ctx?: Ctx, customHeader?: CustomHeader): Promise<AdaptedResponse>;
static postFormData(url: string, _: CookieJar, form: Record<string, any>, qs?: Record<string, any>, options?: GetOptions, ctx?: Ctx): Promise<AdaptedResponse>;
static getJar(): CookieJar;
}
export { Axios };