0
Q:

jquery ajax basic authentication

var username="username_here";
var password="password_here";
$.ajax({
  type: "GET",
  url: "myapi.php",
  dataType: 'json',
  headers: {
    "Authorization": "Basic " + btoa(username + ":" + password)
  },
  success: function (result){
      console.log(result)
  }
});
2

New to Communities?

Join the community