From 7e8b86cf571a43a220dacdb765b627fe8edecc50 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sat, 30 Jan 2021 01:39:55 +0100 Subject: [PATCH] return actual body instead of entire response (whoopsie!) --- src/Network/Http.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Network/Http.cpp b/src/Network/Http.cpp index 2cc60a7..369789b 100644 --- a/src/Network/Http.cpp +++ b/src/Network/Http.cpp @@ -137,7 +137,7 @@ std::string PostHTTP(const std::string& host, const std::string& target, const s // used for reading beast::flat_buffer buffer; - http::response response; + http::response response; http::read(stream, buffer, response); @@ -152,7 +152,7 @@ std::string PostHTTP(const std::string& host, const std::string& target, const s std::string debug_response_str; std::getline(result, debug_response_str); debug("POST " + host + target + ": " + debug_response_str); - return result.str(); + return std::string(response.body()); /*} catch (const std::exception& e) { error(e.what());