Q: How to connect an Angular2+ application to an outside API? I need some assistance on examples of connecting an outside API to an Angular Application that has a username and password for authentication. I know how to connect an outside API that doesn't require authentication but I am trying to connect to an API that has a username and password as well as a proxy connection. And I am unsure how that is passed in the application? Any examples or help would be appreciated, thanks. 

A: The user and password are sending as headers then these headers you need put inside of Post method in the third parameter. This is an example.
      let username: string = 'username';
      let password: string = 'password';
      let headers: Headers = new Headers();
      headers.append("Authorization", "Basic " + btoa(username + ":" + password)); 
      headers.append("Content-Type", "application/x-www-form-urlencoded");
      this._http.post(url, data, {headers: headers})

Answer reference Http Auth
