@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
33 lines (22 loc) • 933 B
Markdown
lang: en
title: 'API docs: rest.redirectroute._constructor_'
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.redirectroute._constructor_.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RedirectRoute](./rest.redirectroute.md) > [(constructor)](./rest.redirectroute._constructor_.md)
## RedirectRoute.(constructor)
Constructs a new instance of the `RedirectRoute` class
<b>Signature:</b>
```typescript
constructor(sourcePath: string, targetLocation: string, statusCode?: number);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| sourcePath | string | |
| targetLocation | string | |
| statusCode | number | |