wchar_t token[50];
http_client client(L"https://example.com/dir/");
http_request request;
std::stringstream ReqBody;
std::string ReqBodyS;
ReqBody << "login=" << TB1T << "&pass=" << TB2T;
ReqBodyS = ReqBody.str();
request.set_body(ReqBodyS);
request.set_method(methods::POST);
request.headers().set_content_type(U("application/x-www-form-urlencoded"));
client.request(request).then([](http_response response) {
if (response.status_code() == status_codes::OK)
{
//
}
});
回复喜欢
Connection: keep-alive
Content-type: text/html
SomeHeader: something here
如何将名称为 SomeHeader 的标题中的文本添加到 Token?我想从某个标题中获取令牌文本