mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
Http: add debug print
This commit is contained in:
parent
ce834a634c
commit
9237f0dd43
@ -123,9 +123,13 @@ std::string Http::POST(const std::string& host, const std::string& target, const
|
||||
beast::flat_buffer buffer;
|
||||
http::response<http::string_body> response;
|
||||
|
||||
auto BackendName = response.base().find("Date");
|
||||
auto BackendName = response.base().find("BeamMP-Endpoint");
|
||||
if (BackendName != response.base().end()) {
|
||||
Application::Console().Write("HTTP POST: Date is " + std::string(BackendName->value()));
|
||||
Application::Console().Write("HTTP POST: BeamMP-Endpoint is " + std::string(BackendName->value()));
|
||||
} else {
|
||||
for (const auto& header : response.base()) {
|
||||
Application::Console().Write(header.name_string().data() + std::string(" = ") + std::string(header.value()));
|
||||
}
|
||||
}
|
||||
|
||||
http::read(stream, buffer, response);
|
||||
|
Loading…
x
Reference in New Issue
Block a user