代码上设置 setRequestHeader 这个方法在IOS真机上显示的 content-type 还是 text/plain
但是在安卓上能设置头为 x-protobuf
请问这是为啥了。求解答
request.setRequestHeader(“Content-Type”, “application/x-www-form-urlencoded”);
request.responseType = ‘arraybuffer’;
试试这个
request.response 接受
试了下 content-type依然是 text/plain
状态500
xhr.responseType = ‘arraybuffer’
xhr.setRequestHeader(‘Content-Type’, ‘application/arraybuffer’);
看下返回的日志
服务端有问题,排查下吧
有这种请求头吗

自定义的。
在安卓上倒是可以正常请求正常返回 
脑阔疼
private sendBuffer(url: string, sendData: Uint8Array) {
let xhr = this.create_xhr(this.responseType);
let method = 'POST'
xhr.onreadystatechange = async () => {
}
xhr.onerror = (e) => {
}
xhr.open(method, url, true);
xhr.setRequestHeader('Content-Type', 'application/arraybuffer');
xhr.send(sendData);
return xhr;
}



