跳过来自HTTP侦听器的登录请求请求

跳过来自HTTP侦听器的登录请求请求,http,httpclient,angular-http-interceptors,Http,Httpclient,Angular Http Interceptors,我有一个angular应用程序,它使用HTTP拦截器拦截所有传出的请求,以向请求添加身份验证令牌。 我不希望这个登录请求。因此,我一直在为此使用http模块。如何在不使用HTTP拦截器的情况下使用httpClientModule实现此目的?使用HttpBackend,它将通过浏览器HTTP API直接将请求发送到后端,而无需通过拦截器链 import { HttpBackend, HttpClient } from '@angular/common/http'; constructor(p

我有一个angular应用程序,它使用HTTP拦截器拦截所有传出的请求,以向请求添加身份验证令牌。
我不希望这个登录请求。因此,我一直在为此使用http模块。如何在不使用HTTP拦截器的情况下使用httpClientModule实现此目的?

使用HttpBackend,它将通过浏览器HTTP API直接将请求发送到后端,而无需通过拦截器链

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

  constructor(private httpClient: HttpClient, handler: HttpBackend) {
    this.httpClient = new HttpClient(handler);
  }

然后,将此httpClient实例用于REST。

使用HttpBackend,它将通过浏览器HTTP API将请求直接发送到后端,而无需经过拦截器链

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

  constructor(private httpClient: HttpClient, handler: HttpBackend) {
    this.httpClient = new HttpClient(handler);
  }
然后,将此httpClient实例用于REST