Page Contents

Home > @loopback/rest > DefaultSequence > (constructor)

DefaultSequence.(constructor)

Constructor: Injects findRoute, invokeMethod & logError methods as promises.

Signature:

constructor(findRoute: FindRoute, parseParams: ParseParams, invoke: InvokeMethod, send: Send, reject: Reject);

Parameters

Parameter Type Description

findRoute

FindRoute

Finds the appropriate controller method, spec and args for invocation (injected via SequenceActions.FIND_ROUTE).

parseParams

ParseParams

The parameter parsing function (injected via SequenceActions.PARSE_PARAMS).

invoke

InvokeMethod

Invokes the method specified by the route (injected via SequenceActions.INVOKE_METHOD).

send

Send

The action to merge the invoke result with the response (injected via SequenceActions.SEND)

reject

Reject

The action to take if the invoke returns a rejected promise result (injected via SequenceActions.REJECT).