ithewei 6 anni fa
parent
commit
e53dc00fd4
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      http/client/http_client.cpp

+ 1 - 0
http/client/http_client.cpp

@@ -125,6 +125,7 @@ int http_client_send(HttpRequest* req, HttpResponse* res, int timeout) {
     }
     if (req->body.size() != 0) {
         curl_easy_setopt(handle, CURLOPT_POSTFIELDS, req->body.c_str());
+        curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE, req->body.size());
     }
 
     if (timeout > 0) {