summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorEgor Pugin <egor.pugin@gmail.com>2018-07-04 20:22:21 +0300
committerEgor Pugin <egor.pugin@gmail.com>2018-07-04 20:22:21 +0300
commitc2d4bdeedd61bbbbf18f2d0f653a669248dcd06f (patch)
treee867d1bac7081cd076a020e333da8290bfb41012 /src/net
parent082e44d7a18774ee1dddd0eaf41221df70e2a1b7 (diff)
Don't destroy post data early.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/HttpClient.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/HttpClient.cpp b/src/net/HttpClient.cpp
index 90dc4b2..0f64e16 100644
--- a/src/net/HttpClient.cpp
+++ b/src/net/HttpClient.cpp
@@ -119,9 +119,9 @@ string CurlHttpClient::makeRequest(const Url& url, const vector<HttpReqArg>& arg
auto u = url.protocol + "://" + url.host + url.path;
curl_easy_setopt(curl, CURLOPT_URL, u.c_str());
+ std::string data;
if (!args.empty())
{
- std::string data;
for (auto &a : args)
data += a.name + "=" + a.value + "&";
data.resize(data.size() - 1);