UNPKG

894 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 /**
22 * Accessor for the underlying `HttpAdapter`
23 *
24 * @example
25 * `const httpAdapter = adapterHost.httpAdapter;`
26 */
27 httpAdapter: T;
28}