make SimpleWeb::Server::Request methods const

This commit is contained in:
Frachop 2019-02-12 23:54:36 +01:00
commit e70a3c40a3

View file

@ -251,7 +251,7 @@ namespace SimpleWeb {
/// The time point when the request header was fully read. /// The time point when the request header was fully read.
std::chrono::system_clock::time_point header_read_time; std::chrono::system_clock::time_point header_read_time;
std::string remote_endpoint_address() noexcept { std::string remote_endpoint_address() const noexcept {
try { try {
return remote_endpoint->address().to_string(); return remote_endpoint->address().to_string();
} }
@ -260,12 +260,12 @@ namespace SimpleWeb {
} }
} }
unsigned short remote_endpoint_port() noexcept { unsigned short remote_endpoint_port() const noexcept {
return remote_endpoint->port(); return remote_endpoint->port();
} }
/// Returns query keys with percent-decoded values. /// Returns query keys with percent-decoded values.
CaseInsensitiveMultimap parse_query_string() noexcept { CaseInsensitiveMultimap parse_query_string() const noexcept {
return SimpleWeb::QueryString::parse(query_string); return SimpleWeb::QueryString::parse(query_string);
} }
}; };