nacos-config2
Version:
nacos config client
46 lines (45 loc) • 1.26 kB
TypeScript
import { IConfiguration, IServerListManager } from './interface';
export declare class HttpAgent {
options: any;
protected loggerDomain: string;
private debugPrefix;
private debug;
accessToken: string;
retryed: number;
constructor(options: any);
get configuration(): IConfiguration;
get serverListMgr(): IServerListManager;
/**
* HTTP 请求客户端
*/
get httpclient(): any;
get unit(): any;
get secretKey(): any;
get requestTimeout(): any;
get accessKey(): any;
get ssl(): any;
get serverPort(): any;
get contextPath(): any;
get clusterName(): any;
get defaultEncoding(): any;
get nacosName(): any;
get nacosPassword(): any;
/**
* 请求
* @param {String} path - 请求 path
* @param {Object} [options] - 参数
* @return {String} value
*/
request(path: any, options?: {
encode?: boolean;
method?: string;
data?: any;
timeout?: number;
headers?: any;
unit?: string;
dataAsQueryString?: boolean;
}): any;
getRequestUrl(currentServer: any): string;
decodeResData(res: any, method?: string): any;
authorize(currentServer: string): Promise<string | false>;
}