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

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

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [invokeMethodWithInterceptors](./context.invokemethodwithinterceptors.md)

## invokeMethodWithInterceptors() function

Invoke a method with the given context

**Signature:**

```typescript
export declare function invokeMethodWithInterceptors(context: Context, target: object, methodName: string, args: InvocationArgs, options?: InvocationOptions): ValueOrPromise<InvocationResult>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  context | [Context](./context.context.md) | Context object |
|  target | object | Target class (for static methods) or object (for instance methods) |
|  methodName | string | Method name |
|  args | [InvocationArgs](./context.invocationargs.md) | An array of argument values |
|  options | [InvocationOptions](./context.invocationoptions.md) | _(Optional)_ Options for the invocation |

**Returns:**

[ValueOrPromise](./context.valueorpromise.md)<!-- -->&lt;[InvocationResult](./context.invocationresult.md)<!-- -->&gt;


