Skip to content

Instantly share code, notes, and snippets.

Created March 10, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/60f0d016d1df0c861407dd067b18ee76 to your computer and use it in GitHub Desktop.
Save anonymous/60f0d016d1df0c861407dd067b18ee76 to your computer and use it in GitHub Desktop.
let headers = new HttpHeaders();
headers = headers.append("Authorization", "Basic " + btoa("username:password"));
headers = headers.append("Content-Type", "application/x-www-form-urlencoded");
this.http.post<Model>(url, data, headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment