title: Remove Authorization Header for some http calls Angular
body: <p>I'm new to angular and trying to setup HTTP Authorization Headers. As of now I'm able to set authorization headers for all API's if token is valid. What I want is to set header for some API's only even if token is available.</p>
  
  <h2>app.module.ts</h2>
  
  <pre><code>@NgModule({
    declarations: [AppComponent],
    imports: [
      HttpClientModule
    ],
    providers: [
      { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
    ]
  })
  </code></pre>
  
  <h2>jwt.interceptor.ts</h2>
  
  <pre><code>import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
  
      import { AuthenticationService } from '@/_services';
      import { Injectable } from '@angular/core';
      import { Observable } from 'rxjs';
  
      @Injectable()
      export class JwtInterceptor implements HttpInterceptor {
          constructor(private authenticationService: AuthenticationService) {}
  
          intercept(request: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
              // add authorization header with jwt token if available
              const currentUser = this.authenticationService.currentUserValue;
              if (currentUser &amp;&amp; currentUser.token) {
                  request = request.clone({
                      setHeaders: {
                          Authorization: `Bearer ${currentUser.token}`
                      }
                  });
              }
  
              return next.handle(request);
          }
      }
  </code></pre>
  
  <h2>home-http.service.ts</h2>
  
  <pre><code>import { HttpClient } from '@angular/common/http';
  import { Injectable } from '@angular/core';
  import { Observable } from 'rxjs';
  import { map } from 'rxjs/operators';
  
  @Injectable()
  export class HomeHttpService {
      constructor(private http: HttpClient) { }
  
      getAll(url: string, paramsVal?: any): Observable&lt;any[]&gt; {
          const options = {params: paramsVal};
          return this.http.get&lt;any[]&gt;(url, options);
      }
  
      public getByID(url: string, id: number | string): Observable&lt;any&gt; {
          return this.http.get&lt;any&gt;(`${url}/${id}`);
      }
  
      public delete(url: string): Observable&lt;any&gt; {
          return this.http.delete&lt;any&gt;(url).pipe(
              map(response =&gt; {
                  return response;
              })
          );
      }
  
      public post(data = [], url: string): Observable&lt;any&gt; {
          return this.http.post&lt;any&gt;(url, data);
      }
  
      public getExternal(url: string): Observable&lt;any&gt; {
          return this.http.get&lt;any&gt;(url);
      }
  
      public put(data: any, url: string): Observable&lt;any&gt; {
          return this.http.put&lt;any&gt;(url, data);
      }
  }
  </code></pre>
  
  <h2>home.service.ts</h2>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  import { HomeHttpService } from '../home-http.service';
  import { Observable } from 'rxjs';
  
  @Injectable()
  export class HomePageService {
    constructor(private apiservice: HomeHttpService) {}
    private basePath = `${url}`;
  
  getAlldata(data): Observable&lt;any&gt; {
      return this.apiservice.getAll(this.basePath, data);
    }
  </code></pre>
  
  <p>How can I setup my code so that for some API's I can remove the authorization header for some APIs</p>