From c2d4bdeedd61bbbbf18f2d0f653a669248dcd06f Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 4 Jul 2018 20:22:21 +0300 Subject: Don't destroy post data early. --- src/net/HttpClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net') 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& 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); -- cgit v1.2.3