aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/http_util
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils/http_util')
-rw-r--r--src/lib/utils/http_util/http_util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/utils/http_util/http_util.cpp b/src/lib/utils/http_util/http_util.cpp
index 913d4fd19..1a15d6418 100644
--- a/src/lib/utils/http_util/http_util.cpp
+++ b/src/lib/utils/http_util/http_util.cpp
@@ -123,7 +123,7 @@ Response http_sync(http_exch_fn http_transact,
if(content_type != "")
outbuf << "Content-Type: " << content_type << "\r\n";
outbuf << "Connection: close\r\n\r\n";
- outbuf.write(reinterpret_cast<const char*>(&body[0]), body.size());
+ outbuf.write(reinterpret_cast<const char*>(body.data()), body.size());
std::istringstream io(http_transact(hostname, outbuf.str()));
@@ -171,8 +171,8 @@ Response http_sync(http_exch_fn http_transact,
std::vector<byte> buf(4096);
while(io.good())
{
- io.read(reinterpret_cast<char*>(&buf[0]), buf.size());
- resp_body.insert(resp_body.end(), &buf[0], &buf[io.gcount()]);
+ io.read(reinterpret_cast<char*>(buf.data()), buf.size());
+ resp_body.insert(resp_body.end(), buf.data(), &buf[io.gcount()]);
}
const std::string header_size = search_map(headers, std::string("Content-Length"));