网络请求添加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);[/code]
正常示例[code]// 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');
