无法更改 fileDownload.js jQuery 插件的内容类型 header
Can't change Content Type header of fileDownload.js jQuery plugin
我正在使用名为 fileDownload.js
的 jQuery 插件
我似乎无法将 Content-Type
header 更改为任何内容。
默认为 x-www-form-urlencoded
.
在我的快递服务器上,这是唯一的 header 我能够从 fileDownload.js
这是我的代码的样子。
$.fileDownload(url, {
httpMethod:'POST',
'Content-Type': 'application/json; charset=utf-8',
data: inputData,
dataType: 'json',
successCallback: function() {},
failCallback: function() {}
});
除了默认 x-www-form-urlencoded
之外我无法获得任何内容类型的任何想法?
通过查看源代码找到了答案。使用此插件您无法更改 header。相反,我解析了我想要的数据并将其放入 url.
我正在使用名为 fileDownload.js
的 jQuery 插件我似乎无法将 Content-Type
header 更改为任何内容。
默认为 x-www-form-urlencoded
.
在我的快递服务器上,这是唯一的 header 我能够从 fileDownload.js
这是我的代码的样子。
$.fileDownload(url, {
httpMethod:'POST',
'Content-Type': 'application/json; charset=utf-8',
data: inputData,
dataType: 'json',
successCallback: function() {},
failCallback: function() {}
});
除了默认 x-www-form-urlencoded
之外我无法获得任何内容类型的任何想法?
通过查看源代码找到了答案。使用此插件您无法更改 header。相反,我解析了我想要的数据并将其放入 url.