title: Angular 8 add custom Request headers using HttpInterceptor
body: <p>In angular 8 HttpInterceptor to add custom  header is not working 
  I need to add custom request header to my http function using HttpInterceptor</p>
  
  <p>Hear my code from HttpInterceptor</p>
  
  <pre><code>intercept(
          req: HttpRequest&lt;any&gt;,
          next: HttpHandler,
        ): Observable&lt;HttpEvent&lt;any&gt;&gt; {
          const newRequest = req.clone({
            headers: req.headers.set('APIKey', 'YOUR-API Key-HERE'),
          });
          return next.handle(newRequest);
  
  
        }
  </code></pre>
  
  <p>The result is not correct as shown in the below image 
  <a href="https://i.stack.imgur.com/tGtdP.jpg" rel="nofollow noreferrer">wrong result</a></p>
  
  <p>I need it as show on the below image </p>
  
  <p><a href="https://i.stack.imgur.com/E809F.jpg" rel="nofollow noreferrer">valid request header</a></p>
  
  <p>any help</p>