UNPKG

942 BTypeScriptView Raw
1import { AbstractHttpAdapter } from '../adapters/http-adapter';
2/**
3 * Defines the `HttpAdapterHost` object.
4 *
5 * `HttpAdapterHost` wraps the underlying
6 * platform-specific `HttpAdapter`. The `HttpAdapter` is a wrapper around the underlying
7 * native HTTP server library (e.g., Express). The `HttpAdapterHost` object
8 * provides methods to `get` and `set` the underlying HttpAdapter.
9 *
10 * @see [Http adapter](https://docs.nestjs.com/faq/http-adapter)
11 *
12 * @publicApi
13 */
14export declare class HttpAdapterHost<T extends AbstractHttpAdapter = AbstractHttpAdapter> {
15 private _httpAdapter?;
16 /**
17 * Accessor for the underlying `HttpAdapter`
18 *
19 * @param httpAdapter reference to the `HttpAdapter` to be set
20 */
21 set httpAdapter(httpAdapter: T);
22 /**
23 * Accessor for the underlying `HttpAdapter`
24 *
25 * @example
26 * `const httpAdapter = adapterHost.httpAdapter;`
27 */
28 get httpAdapter(): T;
29}