#pragma once #include #include #include namespace base::http { template inline std::string ImfDate(std::chrono::time_point point) { return std::format("{0:%a}, {0:%d %b %Y} {0:%T} GMT", std::chrono::clock_cast(std::chrono::time_point_cast(point))); } // use this on a response please :) template constexpr void SetCommonResponseFields(beast::http::response& res) { res.set(beast::http::field::date, ImfDate(std::chrono::utc_clock::now())); res.set(beast::http::field::server, "Holgol"); } } // namespace base::http