Skip to content

Commit

Permalink
feat(context): add support for method interceptors
Browse files Browse the repository at this point in the history
- introduce `@intercept` for classes and/or methods
- enable `invokeMethod()` to execute interceptors
- add support for global interceptors
- add acceptance tests to illustrate how to use interceptors
- apply global interceptors for handler routes
- allow proxies to be created or injected to apply interceptors
- update docs for interceptors
- introduce AsyncProxy type for proxy with async interceptors
- allow global interceptors to be sorted by group
  • Loading branch information
raymondfeng committed May 9, 2019
1 parent af06b69 commit 293188d
Show file tree
Hide file tree
Showing 19 changed files with 2,471 additions and 26 deletions.
3 changes: 3 additions & 0 deletions docs/site/Concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ LoopBack 4 introduces some new concepts that are important to understand:
Controller operates only on processed input and abstractions of backend
services / databases.

- [**Interceptors**](Interceptors.md): A function that intercepts static or
instance method invocations on a class or object.

- [**Route**](Routes.md): The mapping between your API specification and an
Operation. It tells LoopBack which Operation to `invoke()` when given an HTTP
request.
Expand Down
Loading

0 comments on commit 293188d

Please sign in to comment.