title: How to change http req url using Angular interceptor
body: <p>I have created an interceptor</p>
  <pre><code>@Injectable()
  export class HttpsRequestInterceptor implements HttpInterceptor {
    intercept(
      req: HttpRequest&lt;any&gt;,
      next: HttpHandler
    ): Observable&lt;HttpEvent&lt;any&gt;&gt; {
      console.log(req);
      if(req.url == 'https://abcd.azure.net/api/v1/getPendinList') {
        // return Observable.empty();
        console.log('hello')
      }
      const dupReq = req.clone({
        headers: req.headers.set('Consumer-Secret', 'some sample key')
      });
       return next.handle(dupReq);
    }
  }
  </code></pre>
  <p>This is working fine I get console.log whenever I hit<code>https://abcd.azure.net/api/v1/getPendinList</code>.  What I am trying to acheive is that if I hit this url, I want to change this url into something else ,e.g. <code>abcd.api.com/search</code>. So that my url fetch data from new endpoint.</p>
  <p>Is this possible and how.</p>