ngrok / ngrok-python

Embed ngrok secure ingress into your Python apps with a single line of code.
https://ngrok.com
Apache License 2.0
103 stars 19 forks source link

add app-protocol to http builder/forward #99

Closed OfTheDelmer closed 4 months ago

OfTheDelmer commented 4 months ago

Part of #80

Completes adding an example for http2 utilizing app_protocol in our forwarding setup.

In a follow up, we'll add app_protocol plumbing to the labeled listener.

Notes

Testing and example setup were not quite trivial in the synchronous set of python tooling. We were able to validate our examples and app_protocol integration through curl --http2 -v <LISTENER_URL> calls and see things working correctly. We add a not into the Readme to help other quickly validate.

Future work could explore adding a test to our test_connect.py once we identify an http2 python client we'd like to utilize for that. httpx seems to have documented http2 support with its httpx[http2] module installed.