3
在jQuery AJAX GET调用中传递请求标头
我正在尝试使用jQuery在AJAX GET中传递请求标头。在下面的块中,“数据”自动传递查询字符串中的值。有没有办法在请求标头中传递该数据? $.ajax({ url: "http://localhost/PlatformPortal/Buyers/Account/SignIn", data: { signature: authHeader }, type: "GET", success: function() { alert('Success!' + authHeader); } }); 以下内容也不起作用 $.ajax({ url: "http://localhost/PlatformPortal/Buyers/Account/SignIn", beforeSend: { signature: authHeader }, async: false, type: "GET", success: function() { alert('Success!' + authHeader); } });
241
jquery
ajax
client-side