---
lang: en
title: 'API docs: rest.httphandler.registercontroller'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.httphandler.registercontroller.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) &gt; [registerController](./rest.httphandler.registercontroller.md)

## HttpHandler.registerController() method

<b>Signature:</b>

```typescript
registerController<T>(spec: ControllerSpec, controllerCtor: ControllerClass<T>, controllerFactory?: ControllerFactory<T>): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  spec | <code>ControllerSpec</code> |  |
|  controllerCtor | <code>ControllerClass&lt;T&gt;</code> |  |
|  controllerFactory | <code>ControllerFactory&lt;T&gt;</code> |  |

<b>Returns:</b>

`void`


