我正在尝试将 URLRequest 标头的 Content-Type 设置为“application/json”。这是代码:
var request:URLRequest = new URLRequest("http://localhost");
request.contentType = "application/json; charset=UTF-8";
但正如您在屏幕截图中看到的那样,Content-Type 不在标题中:
http://screencast.com/t/vHxHbSUOFM
但它在请求正文中:
http://screencast.com/t/irB16taO
如何使它正确?