Q: Using basic authorization http header in angular5 I am trying to withdraw information from an API URL however it requests basic authorization http header. How do I withdraw information from the URL using the header?
this.myHttpClient.get(URL).subscribe((x: Array<any>) => { this.guidesList = x });

Where do I add the header in the syntax?

A: I'm not sure if it's the answer to your problem, I use this architecture:
in Component:
    this._appPlexService.myApiFunction(this.id).subscribe(result => {
            this.res = result;
          });

in Service:
      myApiFunction(id: string) {

        // add authorization header with jwt token
        let headers = new HttpHeaders({ 'Authorization': 'Bearer ' + this.token });
        let options = { headers: headers };

        return this.http.post(this.baseUrl + '/api/myApiFunction', id , options);
      }

Best Regards!
Fabricio
