我想向带有几个自定义标头的服务发送AJAX调用。请求成功完成后,标头不会被发送。以下是我的代码片段:
func123: function (params) {
return $.ajax({
url: "http://localhost:8080/",
type: 'GET',
headers: {
"Contract": "1",
"Vector": "abc",
"Authorization": "xyz"
},
dataType: 'json',
contentType: 'application/json'
});
},