http_request request(methods::POST);
request.headers().add(L"Content-Type", L"application/json; charset=utf-8");
request.headers().add(L"X-Requested-With", L"XMLHttpRequest");
request.set_body(body);
上面的代码给出了以下输出:
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 334
Content-Type: text/html; charset=us-ascii
Date: Fri, 10 Mar 2017 23:05:43 GMT
Server: Microsoft-HTTPAPI/2.0
你能告诉我我的参数有什么问题吗?