Fix: clear reponse text before doing curl request
Response text is appended to whatever is in _text, so that should be cleared before every request.
This commit is contained in:
parent
14c7aed560
commit
6232f9d593
@ -74,6 +74,7 @@ std::string requester::post(const std::string& url, const std::string& json) {
|
||||
curl_easy_setopt(_h.get(), CURLOPT_HTTPHEADER, headers);
|
||||
curl_easy_setopt(_h.get(), CURLOPT_WRITEDATA, this);
|
||||
|
||||
_text = "";
|
||||
auto success = curl_easy_perform(_h.get());
|
||||
if (success != CURLE_OK) {
|
||||
std::ostringstream oss;
|
||||
|
Loading…
x
Reference in New Issue
Block a user