Defines the interceptor for a Request. This allows you to intercept requests before starting.

Adds a custom header to a request:

const addCustomHeaderInterceptor
({ key, value }: { key: string; value: string }): RequestInterceptor =>
({ request }) => {
const clone = request.clone()
clone.headers.set(key, value)

return clone
}