Answers for "how to pass basic auth for api in angular 11"

0

how to pass basic auth for api in angular 11

import { HttpHeaders } from '@angular/common/http';

const httpOptions = {
  headers: new HttpHeaders({
    'Content-Type':  'application/json',
    'Authorization': 'Basic ' + btoa('username:password')
  })
};
Posted by: Guest on May-12-2021

Code answers related to "how to pass basic auth for api in angular 11"

Code answers related to "Javascript"

Browse Popular Code Answers by Language