@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
117 lines (56 loc) • 1.65 kB
Markdown
---
lang: en
title: 'API docs: rest.requestcontext._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.requestcontext._constructor_.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RequestContext](./rest.requestcontext.md) > [(constructor)](./rest.requestcontext._constructor_.md)
## RequestContext.(constructor)
Constructs a new instance of the `RequestContext` class
**Signature:**
```typescript
constructor(request: Request, response: Response, parent: Context, serverConfig: RestServerResolvedConfig, name?: string);
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
request
</td><td markdown="1">
Request
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
response
</td><td markdown="1">
Response
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
parent
</td><td markdown="1">
[Context](./context.context.md)
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
serverConfig
</td><td markdown="1">
[RestServerResolvedConfig](./rest.restserverresolvedconfig.md)
</td><td markdown="1">
</td></tr>
<tr><td markdown="1">
name
</td><td markdown="1">
string
</td><td markdown="1">
_(Optional)_
</td></tr>
</tbody></table>