Heartbeat: Try backup1 and backup2, refactor sentry reporting

This commit is contained in:
Lion Kortlepel
2021-08-10 12:51:20 +02:00
committed by Lion
parent c0faff5b05
commit fe6e1e6266
7 changed files with 51 additions and 35 deletions

View File

@@ -124,14 +124,14 @@ std::string Http::POST(const std::string& host, const std::string& target, const
http::read(stream, buffer, response);
Sentry.AddExtra("reponse-code", std::to_string(response.result_int()));
Sentry.SetExtra("reponse-code", std::to_string(response.result_int()));
for (const auto& header : response.base()) {
// need to do explicit casts to convert string_view to string
// since string_view may not be null-terminated (and in fact isn't, here)
std::string KeyString(header.name_string());
std::string ValueString(header.value());
Sentry.AddExtra(KeyString, ValueString);
Sentry.SetExtra(KeyString, ValueString);
}
std::stringstream result;