Skip to main content

2 posts tagged with "interceptor"

View All Tags

· 5 min read
Diana Lau

Originally published on strongloop.com

Previously, we looked at how to add a global interceptor. In this article, we are going to build an application that validates the incoming request using class level and method level interceptors 

For the complete application, you can go to this repo: https://github.com/dhmlau/loopback4-interceptors

· 4 min read
Diana Lau

Originally published on strongloop.com

Wondering what an interceptor is in LoopBack 4? 

Interceptors are reusable functions to provide aspect-oriented logic around method invocations. 

Seems pretty useful, right? There are 3 levels of interceptors: global, class level and method level. In this article, we are going to look into what a global interceptor is and how to use it.