Simple-Web-Server icon indicating copy to clipboard operation
Simple-Web-Server copied to clipboard

HttpClient::request()

Open Type1J opened this issue 6 years ago • 1 comments

It would be very useful if the HttpClient::request() function would return an awaitable type for use in coroutines. (See the "Naked Coroutines" talk by Gor Nishanov.)

Type1J avatar Apr 24 '18 17:04 Type1J

You can create your own wrappers using for instance https://github.com/Naios/continuabl. I have not tried this library myself, but I found this example to be interesting: https://github.com/Naios/continuable/blob/master/examples/example-asio/example-asio.cpp.

In general though, due to the complexity of this subject, I would wait for the standards committee to finish their work on coroutines.

eidheim avatar Apr 29 '18 06:04 eidheim