Function authHttpInterceptorFn

  • Functional AuthHttpInterceptor to include the access token in matching requests.

    Note: Should only be used as of Angular 15

    Parameters

    • req: HttpRequest<any>

      An outgoing HTTP request with an optional typed body.

    • handle: ((req) => Observable<HttpEvent<unknown>>)

      Represents the next interceptor in an interceptor chain, or the real backend if there are no further interceptors.

        • (req): Observable<HttpEvent<unknown>>
        • Parameters

          • req: HttpRequest<unknown>

          Returns Observable<HttpEvent<unknown>>

    Returns Observable<HttpEvent<any>>

    An Observable representing the intercepted HttpRequest