xhr.setRequestHeader("Content-type","application/json");
根据这个图我发送的参数请求
都是这种类型的参数,如果data:我加上JSON.stringify就变成
JSON.stringify
我该怎么设置请求头才能发送对象类型的参数。
- data: { account: 111, ipAddress: '' } + data: JSON.stringify({ account: 111, ipAddress: '' })
2.1m questions
2.1m answers
63 comments
56.7k users