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

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

[Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [MiddlewareContext](./express.middlewarecontext.md)

## MiddlewareContext class

A per-request Context for middleware to combine an IoC container with handler context (request, response, etc.).

<b>Signature:</b>

```typescript
export declare class MiddlewareContext extends Context implements HandlerContext 
```
<b>Extends:</b> [Context](./context.context.md)

<b>Implements:</b> [HandlerContext](./express.handlercontext.md)

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(request, response, parent, name)](./express.middlewarecontext._constructor_.md) |  | Constructor for <code>MiddlewareContext</code> |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [request](./express.middlewarecontext.request.md) |  | Request |  |
|  [response](./express.middlewarecontext.response.md) |  | Response |  |
|  [responseFinished](./express.middlewarecontext.responsefinished.md) |  | boolean | A flag to tell if the response is finished. |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [setupBindings()](./express.middlewarecontext.setupbindings.md) |  |  |


