Skip to main content

Function: Method()

Method(method, path?): (target, propertyKey, descriptor) => void

Defined in: service-core/src/decorators/RouteDecorators.ts:182

Indicates that the decorated function handles incoming HTTP requests for the specified HTTP method(s) at the given sub-path.

Parameters

method

string | string[]

The HTTP method(s) to handle requests for.

path?

string

The sub-path that the route handles requests for.

Returns

(target, propertyKey, descriptor) => void