How to Bypass HTTP Interceptor while calling api

When injected, HttpBackend dispatches requests directly to the backend, without going through the interceptor chain.

import {HttpBackend, HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';

  providedIn: 'root'
export class BypassHttpService {
  private httpClient: HttpClient;
    private handler: HttpBackend,
  ) {
    this.httpClient = new HttpClient(handler);

  getData() {
    return this.httpClient.get(url);


Leave a Reply

Your email address will not be published. Required fields are marked *