---
lang: en
title: 'API docs: rest.httphandler'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.httphandler.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [HttpHandler](./rest.httphandler.md)

## HttpHandler class

**Signature:**

```typescript
export declare class HttpHandler 
```

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(\_rootContext, \_serverConfig, \_routes)](./rest.httphandler._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `HttpHandler` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[\_openApiComponents](./rest.httphandler._openapicomponents.md)


</td><td>

`protected`


</td><td>

ComponentsObject


</td><td>

Shared OpenAPI spec objects as `components`


</td></tr>
<tr><td>

[\_rootContext](./rest.httphandler._rootcontext.md)


</td><td>

`protected`

`readonly`


</td><td>

[Context](./context.context.md)


</td><td>


</td></tr>
<tr><td>

[\_routes](./rest.httphandler._routes.md)


</td><td>

`protected`

`readonly`


</td><td>

[RoutingTable](./rest.routingtable.md)


</td><td>


</td></tr>
<tr><td>

[\_serverConfig](./rest.httphandler._serverconfig.md)


</td><td>

`protected`

`readonly`


</td><td>

[RestServerResolvedConfig](./rest.restserverresolvedconfig.md)


</td><td>


</td></tr>
<tr><td>

[handleRequest](./rest.httphandler.handlerequest.md)


</td><td>


</td><td>

(request: Request, response: Response) =&gt; Promise&lt;void&gt;


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[\_handleRequest(request, response)](./rest.httphandler._handlerequest.md)


</td><td>

`protected`


</td><td>


</td></tr>
<tr><td>

[describeApiPaths()](./rest.httphandler.describeapipaths.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[findRoute(request)](./rest.httphandler.findroute.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[getApiComponents()](./rest.httphandler.getapicomponents.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[getApiDefinitions()](./rest.httphandler.getapidefinitions.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[registerApiComponents(defs)](./rest.httphandler.registerapicomponents.md)


</td><td>


</td><td>

Merge components into the OpenApi spec


</td></tr>
<tr><td>

[registerApiDefinitions(defs)](./rest.httphandler.registerapidefinitions.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[registerController(spec, controllerCtor, controllerFactory)](./rest.httphandler.registercontroller.md)


</td><td>


</td><td>


</td></tr>
<tr><td>

[registerRoute(route)](./rest.httphandler.registerroute.md)


</td><td>


</td><td>


</td></tr>
</tbody></table>

