Skip to content
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

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

reneme
Copy link
Collaborator

@reneme reneme commented Feb 2, 2024

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.

@reneme reneme added this to the Botan 3.3.0 milestone Feb 2, 2024
@reneme reneme self-assigned this Feb 2, 2024
@reneme reneme force-pushed the doc/https_clients branch 2 times, most recently from ee40393 to c36d7bc Compare February 2, 2024 15:29
@coveralls
Copy link

coveralls commented Feb 2, 2024

Coverage Status

coverage: 92.012% (+0.02%) from 91.996%
when pulling 69235b2 on Rohde-Schwarz:doc/https_clients
into 7f15ce7 on randombit:master.

@reneme reneme modified the milestones: Botan 3.3.0, Botan 3.4.0 Feb 13, 2024
Copy link
Collaborator

@FAlbertDev FAlbertDev left a 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 👍

@reneme
Copy link
Collaborator Author

reneme commented Feb 23, 2024

@randombit Is that okay to merge, or would you prefer to keep the master branch pristine in case we need to follow up with a 3.3.1 release? We'd love to have this upstream, because it is part of a contribution the the "BSI Kongress" (in German). The paper deadline is on Monday, and I'd like to place a perma-link to the example. :)

@reneme reneme merged commit 72ad0a8 into randombit:master Feb 26, 2024
39 checks passed
@reneme reneme deleted the doc/https_clients branch February 26, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants