@@ -40,9 +40,9 @@ namespace http = beast::http;
4040namespace net = boost::asio;
4141using tcp = boost::asio::ip::tcp;
4242
43- constexpr net::string_view c_host { " 127.0.0.1" } ;
44- constexpr net::string_view c_port { " 8080" } ;
45- constexpr net::string_view c_target { " /graphql" } ;
43+ constexpr auto c_host = " 127.0.0.1" sv ;
44+ constexpr auto c_port = " 8080" sv ;
45+ constexpr auto c_target = " /graphql" sv ;
4646constexpr int c_version = 11 ; // HTTP 1.1
4747
4848class Query
@@ -95,9 +95,9 @@ std::future<std::string> Query::getRelay(std::string&& queryArg,
9595 net::io_context ioc;
9696 auto future = net::co_spawn (
9797 ioc,
98- [](net::string_view host,
99- net::string_view port,
100- net::string_view target,
98+ [](const char * host,
99+ const char * port,
100+ const char * target,
101101 int version,
102102 std::string requestBody) -> net::awaitable<std::string> {
103103 // These objects perform our I/O. They use an executor with a default completion token
@@ -151,7 +151,7 @@ std::future<std::string> Query::getRelay(std::string&& queryArg,
151151 }
152152
153153 co_return std::string { std::move (res.body ()) };
154- }(m_host, m_port, m_target, m_version, std::move (requestBody)),
154+ }(m_host. c_str () , m_port. c_str () , m_target. c_str () , m_version, std::move (requestBody)),
155155 net::use_future);
156156
157157 ioc.run ();
0 commit comments