Use basic authentication with jQuery and Ajax

前端 未结 10 1234
野的像风
野的像风 2020-11-21 06:11

I am trying to create a basic authentication through the browser, but I can\'t really get there.

If this script won\'t be here the browser authentication will take o

10条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-21 06:53

    Or, simply use the headers property introduced in 1.5:

    headers: {"Authorization": "Basic xxxx"}
    

    Reference: jQuery Ajax API

提交回复
热议问题