@multiversx/sdk-nestjs-http
Version:
Multiversx SDK Nestjs http package
26 lines (25 loc) • 1.43 kB
TypeScript
import { MetricsService } from "@multiversx/sdk-nestjs-monitoring";
import { ApiSettings } from "./entities/api.settings";
import { ApiModuleOptions } from "./entities/api.module.options";
export declare class ApiService {
private readonly options;
private readonly metricsService;
private readonly defaultTimeout;
private keepaliveAgent;
private readonly axiosInstance;
private static concurrentRequests;
constructor(options: ApiModuleOptions, metricsService: MetricsService);
private getKeepAliveAgent;
private getConfig;
private requestsExecuter;
private incrementConcurrentRequests;
private decrementConcurrentRequests;
get(url: string, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
put(url: string, data: any, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
patch(url: string, data: any, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
post(url: string, data: any, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
delete(url: string, data: any, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
head(url: string, settings?: ApiSettings, errorHandler?: (error: any) => Promise<boolean>): Promise<any>;
private getHostname;
private getCustomError;
}