# Interceptor

*noun*

say it: **“in-ter-SEP-ter”** **/ˌɪntərˈsɛptər/**

A function that sees every HTTP request and response in one place, such as to add a token.

## What is **Interceptor**?

An **interceptor** is a function that sees every HTTP request and response, so you can add headers, show a loading spinner or handle errors in one place.

```typescript
export const loggingInterceptor: HttpInterceptorFn = (req, next) => {
  console.log('Calling', req.url);
  return next(req);
};

provideHttpClient(withInterceptors([loggingInterceptor]))
```

## In a sentence

- “Our **interceptor** adds the Authorization header to every API call.”

Level: Journeyman · [More Angular terms at this level](https://www.ask-codey.com/glossary?category=angular&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/interceptor
