pluto-http-client
Version:
HTTP client for NodeJS. Inspired in the Java JAX-RS spec so you can expect excellence, versatility and extensibility.
29 lines (28 loc) • 1.1 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { URL } from "url";
import { WebTarget } from "./web-target";
import { MultiValueMap, TreeMultiValueMap } from "../utils/collections";
import { Header } from "./header";
import { Filter } from "./filter";
import http from "http";
import https from "https";
export declare class Client {
private readonly _timeout?;
private readonly _headers;
private readonly _filters;
private readonly _agent?;
private readonly _allowInsecure;
constructor(headers: MultiValueMap<Header>, filters: TreeMultiValueMap<number, Filter>, allowInsecure: boolean, timeout?: number, agent?: http.Agent | https.Agent);
target(url: string | URL): WebTarget;
get timeout(): number | undefined;
get headers(): MultiValueMap<Header>;
get filters(): TreeMultiValueMap<number, Filter>;
get agent(): http.Agent | https.Agent | undefined;
get allowInsecure(): boolean;
snapshot(): Client;
}
export declare class Http2Client extends Client {
target(url: string | URL): WebTarget;
}