This can be some a stretch, but let us just think that we want results by doing this:

  • I've a catalog.html code file within the web cause of a server. The javascript for the reason that file must make an ajax request to /secure/ajax.php
  • My way through the /secure/ directory remains safe and secure using Fundamental Authentication
  • I'd rather not bother the consumer with signing in towards the /secure/ section

Can One submit qualifications for fundamental authentication by having an AJAX request?

xmlHttpRequest.setRequestHeader is the friend.

xhr.setRequestHeader("Authentication", "username:password in base64")

you need to simply convert username:password to base64