22 static constexpr int reserve_expect = Fun::reserve_expect;
26 void operator()(
auto& req,
int status,
const auto& body)
30 if(status >= 200 && status < 300)
45 void operator()(
auto& req, std::string_view) { err(req); }
48 using implementation = http_client_request<answer, error>;
52 Fun f, Err err, boost::asio::io_context& ctx,
const std::string& server,
53 const std::string& path, std::string_view verb =
"GET")
54 : m_impl{std::make_shared<implementation>(
55 answer{std::move(f), err}, error{err}, ctx, verb, server, path)}
61 void resolve(
const std::string& server,
const std::string& port)
63 m_impl->resolve(server, port);
66 void close() { m_impl->close(); }
69 std::shared_ptr<implementation> m_impl;
spdlog::logger & logger() noexcept
Where the errors will be logged. Default is stderr.
Definition context.cpp:120