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';
@Injectable({
providedIn: 'root'
})
export class BypassHttpService {
private httpClient: HttpClient;
constructor(
private handler: HttpBackend,
) {
this.httpClient = new HttpClient(handler);
}
getData() {
return this.httpClient.get(url);
}
}