---
lang: en
title: 'API docs: express.invokemiddlewareprovider.action'
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.invokemiddlewareprovider.action.html
---

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

[Home](./index.md) &gt; [@loopback/express](./express.md) &gt; [InvokeMiddlewareProvider](./express.invokemiddlewareprovider.md) &gt; [action](./express.invokemiddlewareprovider.action.md)

## InvokeMiddlewareProvider.action() method

<b>Signature:</b>

```typescript
static action(middlewareCtx: MiddlewareContext, optionsOrHandlers?: InvokeMiddlewareOptions | ExpressRequestHandler[]): Promise<any>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  middlewareCtx | [MiddlewareContext](./express.middlewarecontext.md) |  |
|  optionsOrHandlers | [InvokeMiddlewareOptions](./express.invokemiddlewareoptions.md) \| [ExpressRequestHandler](./express.expressrequesthandler.md)<!-- -->\[\] |  |

<b>Returns:</b>

Promise&lt;any&gt;


