服务器都做了以下跨域处理了:
buffer.append("Content-type: application/json\r\n");
buffer.append("Access-Control-Allow-Origin:*\r\n");
buffer.append("Access-Control-Allow-Methods: POST, OPTIONS\r\n");
buffer.append("Access-Control-Allow-Headers: Content-Type\r\n");
还是报错:
Access to XMLHttpRequest at 'http://192.168.1.32:8888/updatejson' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.