适配Android

This commit is contained in:
xzl
2017-05-25 17:41:58 +08:00
parent ebf1c53543
commit f6e79584ce
4 changed files with 176 additions and 24 deletions

View File

@@ -55,7 +55,7 @@ void HttpClient::sendRequest(const string &strUrl){
_header.emplace(string("User-Agent"),"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36");
if(!_body.empty()){
_header.emplace(string("Content-Length"),std::to_string(_body.size()));
_header.emplace(string("Content-Length"),to_string(_body.size()));
_header.emplace(string("Content-Type"),"application/x-www-form-urlencoded; charset=UTF-8");
}