@@ -40,9 +40,9 @@ namespace http = beast::http;
40
40
namespace net = boost::asio;
41
41
using tcp = boost::asio::ip::tcp;
42
42
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 ;
46
46
constexpr int c_version = 11 ; // HTTP 1.1
47
47
48
48
class Query
@@ -95,9 +95,9 @@ std::future<std::string> Query::getRelay(std::string&& queryArg,
95
95
net::io_context ioc;
96
96
auto future = net::co_spawn (
97
97
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,
101
101
int version,
102
102
std::string requestBody) -> net::awaitable<std::string> {
103
103
// 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,
151
151
}
152
152
153
153
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)),
155
155
net::use_future);
156
156
157
157
ioc.run ();
0 commit comments