UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

29 lines (28 loc) 783 B
/// <reference types="node" /> /// <reference types="node" /> export type HttpRequestOptions = { method?: string; protocol: string; host: string; port: number; path: string; user?: string; pass?: string; timeout?: number; headers?: Record<string, string>; }; export type AgentOptions = { rejectUnaurhorized?: boolean; keepAlive?: boolean; }; export declare class HttpRequestSender { private agent?; private authData?; constructor(agentOptions?: AgentOptions); sendRequest(options: HttpRequestOptions, postData?: Buffer | string | FormData): Promise<Response>; private sendRequestWithAuth; private static getURL; private getAuthorization; private invalidateAuthorization; private static getAuthHeader; }