[]网络请求添加headers后 post数据错误

网络请求添加headers后 post数据错误
post数据变成了Request Payload,不是Form Data
不添加headers则正常 
示例代码
 
var headers = [
'C-Sign', sign
];

// this.caller = caller;
this.callbackHandler = callback;
// this.errcallback = errcallback;
//this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress);
this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete);
this.http.once(Laya.Event.ERROR, this, this.onHttpRequestError);
this.http.send(url, 'chapterid=7125', 'post', 'json', headers);

QQ截图20180916151251.jpg


正常示例
// this.caller = caller;
this.callbackHandler = callback;
// this.errcallback = errcallback;
//this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress);
this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete);
this.http.once(Laya.Event.ERROR, this, this.onHttpRequestError);
this.http.send(url, 'chapterid=7125', 'post', 'json');

QQ截图20180916151351.jpg

 
已邀请:

魂影

赞同来自:

已解决
header需要添加
var headers = [
"Content-Type", "application/x-www-form-urlencoded",
'C-Sign', sign
];

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作