-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: Examples of HTTPS clients using ASIO #3901
Conversation
ee40393
to
c36d7bc
Compare
c36d7bc
to
d31d6cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the new client example 👍
@randombit Is that okay to merge, or would you prefer to keep the |
This adds another example that uses C++20 coroutines to implement a basic HTTPS client. Note that this example needs a fairly recent version of Boost: 1.81.0 (December 2022). Use it like so:
./tls_stream_coroutine_client botan.randombit.net 443 /news.html
. It also adapts the existing example (tls_stream_client
), that also uses ASIO but with callback handler methods instead of coroutines. That may now also be called with a user-defined host and HTTP target.Note that the coroutine example is pretty much the same as in #3799 but with less "convenience additions" to the library. Namely, the deduction guides for
TLS::Stream
, only.