On 28/09/2018 05:32, Vinícius dos Santos Oliveira wrote:
2018-09-28 5:58 GMT-03:00 Damien Buhl via Boost
mailto:boost@lists.boost.org>: GET <https://nxxm.github.io/xxhr/html/namespacexxhr.html#a69bafa24d7c33b004a7de86... https://nxxm.github.io/xxhr/html/namespacexxhr.html#a69bafa24d7c33b004a7de86...>( "http://httpbin.org/anything"s, on_response = [](auto&& resp) { std::cout << resp.text; });
Use ASIO async model. Completion token as last argument. N4045[1] is a good read to get you started.
I can help review the library once you finish this small task.
Nice catch and Thanks Vinícius for pointing that out. I've considered bringing that at the top-level of the API as one is used to with Asio, but the reason I didn't do it for now is that it requires me alot more of implementation (that I'd like to make) for the WebAssembly backend which hasn't asio. One important point for me is that this high-level API forces an asynchronous way of thinking your programs, because it is the only way to have C++ that returns CPU time to environments like a Web browser WASM implementation.
I can help review the library once you finish this small task. Cool I would enjoy it, I'll ping you back when I've integrated a completion token in the API.
-- Damien Buhl Software Developer +33 6 77 43 10 05