---
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) &gt; [@loopback/rest](./rest.md) &gt; [RequestContext](./rest.requestcontext.md) &gt; [(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

|  Parameter | Type | Description |
|  --- | --- | --- |
|  request | Request |  |
|  response | Response |  |
|  parent | [Context](./context.context.md) |  |
|  serverConfig | [RestServerResolvedConfig](./rest.restserverresolvedconfig.md) |  |
|  name | string | _(Optional)_ |


