1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.HttpAdapterHost = void 0;
|
4 | /**
|
5 | * Defines the `HttpAdapterHost` object.
|
6 | *
|
7 | * `HttpAdapterHost` wraps the underlying
|
8 | * platform-specific `HttpAdapter`. The `HttpAdapter` is a wrapper around the underlying
|
9 | * native HTTP server library (e.g., Express). The `HttpAdapterHost` object
|
10 | * provides methods to `get` and `set` the underlying HttpAdapter.
|
11 | *
|
12 | * @see [Http adapter](https://docs.nestjs.com/faq/http-adapter)
|
13 | *
|
14 | * @publicApi
|
15 | */
|
16 | class HttpAdapterHost {
|
17 | /**
|
18 | * Accessor for the underlying `HttpAdapter`
|
19 | *
|
20 | * @param httpAdapter reference to the `HttpAdapter` to be set
|
21 | */
|
22 | set httpAdapter(httpAdapter) {
|
23 | this._httpAdapter = httpAdapter;
|
24 | }
|
25 | /**
|
26 | * Accessor for the underlying `HttpAdapter`
|
27 | *
|
28 | * @example
|
29 | * `const httpAdapter = adapterHost.httpAdapter;`
|
30 | */
|
31 | get httpAdapter() {
|
32 | return this._httpAdapter;
|
33 | }
|
34 | }
|
35 | exports.HttpAdapterHost = HttpAdapterHost;
|