diff options
Diffstat (limited to 'cli/tsc/dts/lib.deno.unstable.d.ts')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 88f78b8a5..34531ef39 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -38,141 +38,6 @@ declare namespace Deno { /** **UNSTABLE**: New API, yet to be vetted. * - * A custom `HttpClient` for use with {@linkcode fetch} function. This is - * designed to allow custom certificates or proxies to be used with `fetch()`. - * - * @example ```ts - * const caCert = await Deno.readTextFile("./ca.pem"); - * const client = Deno.createHttpClient({ caCerts: [ caCert ] }); - * const req = await fetch("https://myserver.com", { client }); - * ``` - * - * @category Fetch - * @experimental - */ - export interface HttpClient extends Disposable { - /** Close the HTTP client. */ - close(): void; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * The options used when creating a {@linkcode Deno.HttpClient}. - * - * @category Fetch - * @experimental - */ - export interface CreateHttpClientOptions { - /** A list of root certificates that will be used in addition to the - * default root certificates to verify the peer's certificate. - * - * Must be in PEM format. */ - caCerts?: string[]; - /** A HTTP proxy to use for new connections. */ - proxy?: Proxy; - /** Sets the maximum number of idle connections per host allowed in the pool. */ - poolMaxIdlePerHost?: number; - /** Set an optional timeout for idle sockets being kept-alive. - * Set to false to disable the timeout. */ - poolIdleTimeout?: number | false; - /** - * Whether HTTP/1.1 is allowed or not. - * - * @default {true} - */ - http1?: boolean; - /** Whether HTTP/2 is allowed or not. - * - * @default {true} - */ - http2?: boolean; - /** Whether setting the host header is allowed or not. - * - * @default {false} - */ - allowHost?: boolean; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * The definition of a proxy when specifying - * {@linkcode Deno.CreateHttpClientOptions}. - * - * @category Fetch - * @experimental - */ - export interface Proxy { - /** The string URL of the proxy server to use. */ - url: string; - /** The basic auth credentials to be used against the proxy server. */ - basicAuth?: BasicAuth; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * Basic authentication credentials to be used with a {@linkcode Deno.Proxy} - * server when specifying {@linkcode Deno.CreateHttpClientOptions}. - * - * @category Fetch - * @experimental - */ - export interface BasicAuth { - /** The username to be used against the proxy server. */ - username: string; - /** The password to be used against the proxy server. */ - password: string; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * Create a custom HttpClient to use with {@linkcode fetch}. This is an - * extension of the web platform Fetch API which allows Deno to use custom - * TLS certificates and connect via a proxy while using `fetch()`. - * - * @example ```ts - * const caCert = await Deno.readTextFile("./ca.pem"); - * const client = Deno.createHttpClient({ caCerts: [ caCert ] }); - * const response = await fetch("https://myserver.com", { client }); - * ``` - * - * @example ```ts - * const client = Deno.createHttpClient({ - * proxy: { url: "http://myproxy.com:8080" } - * }); - * const response = await fetch("https://myserver.com", { client }); - * ``` - * - * @category Fetch - * @experimental - */ - export function createHttpClient( - options: CreateHttpClientOptions, - ): HttpClient; - - /** **UNSTABLE**: New API, yet to be vetted. - * - * Create a custom HttpClient to use with {@linkcode fetch}. This is an - * extension of the web platform Fetch API which allows Deno to use custom - * TLS certificates and connect via a proxy while using `fetch()`. - * - * @example ```ts - * const caCert = await Deno.readTextFile("./ca.pem"); - * // Load a client key and certificate that we'll use to connect - * const key = await Deno.readTextFile("./key.key"); - * const cert = await Deno.readTextFile("./cert.crt"); - * const client = Deno.createHttpClient({ caCerts: [ caCert ], key, cert }); - * const response = await fetch("https://myserver.com", { client }); - * ``` - * - * @category Fetch - * @experimental - */ - export function createHttpClient( - options: CreateHttpClientOptions & TlsCertifiedKeyPem, - ): HttpClient; - - /** **UNSTABLE**: New API, yet to be vetted. - * * Represents membership of a IPv4 multicast group. * * @category Network |