Created
April 23, 2018 05:37
-
-
Save tqcenglish/2740ac11f35a9939c1fc7ed93cd8bbc9 to your computer and use it in GitHub Desktop.
ajax 设置请求头
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajaxSetup({ | |
beforeSend: (xhr) => { | |
xhr.setRequestHeader('Authorization', 'Basic YWRtaW46YWRtaW4='); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment