0
我使用节点JS一个有效的JSON文件中,这是我建立我的回应:语法错误
response.writeHead(200, {"Content-Type": "script"});
response.write(JSON.stringify({"test":"fail"}));
response.end();
客户端发出JSONP请求,并在Chrome中的Safari我得到这个错误:
Resource interpreted as Script but transferred with MIME type text/plain.
SyntaxError: Unexpected token ':'
的浏览器可以访问它收到的响应:
{"test":"fail"}
哪里语法错误C ome从?