Interceptors, Middleware, Pipes, Guards and Exception Filters - Where they fit


Author :: Kevin Vecmanis


Where each of these three pieces fit into the API request/response system.

Table of Contents

Interceptors

Can be used for:

  • Modifying URLs
  • Serving user feedback (spinners, loaders ,etc…)
  • Formatting request/response bodies
  • Maniuplate headers
  • Error retry logic
  • Lifecyle profiling - because interceptors can access both requests and responses, you have the flexibility to inject and track profiling metrics.
  • Mocking responses
  • Caching responses
  • Authentication


Middleware


Exception Filters
Pipes
Guards

Kevin Vecmanis