Forbit to create http async clients on stack since they are derived from std::shared_from_this.
This commit is contained in:
@@ -9,12 +9,10 @@
|
||||
// Only HttpBin.org has this issue.
|
||||
|
||||
static void Test(boost::asio::io_context& io_context) {
|
||||
auto request = webcc::HttpRequest::Make(webcc::kHttpGet, "/get",
|
||||
"httpbin.org");
|
||||
auto request = webcc::HttpRequest::New(webcc::kHttpGet, "/get",
|
||||
"httpbin.org");
|
||||
|
||||
webcc::HttpAsyncClientPtr client{
|
||||
new webcc::HttpAsyncClient(io_context)
|
||||
};
|
||||
auto client = webcc::HttpAsyncClient::New(io_context);
|
||||
|
||||
client->SetTimeout(3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user