Skip to content

Sample code for: Python HTTPX: Making HTTP Requests With HTTPX2 - #820

Open
stephengruppetta wants to merge 1 commit into
masterfrom
python-httpx
Open

Sample code for: Python HTTPX: Making HTTP Requests With HTTPX2#820
stephengruppetta wants to merge 1 commit into
masterfrom
python-httpx

Conversation

@stephengruppetta

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Code examples for the Python HTTPX: Making HTTP Requests With HTTPX2 tutorial. Files live in the python-httpx/ top-level folder, named after the article slug.

Generated from the tutorial markdown with the post-materials skill, then verified locally before pushing. Every file was executed against httpx2 2.12.0: the thirteen named examples each reproduce the output documented in the article, and default_timeout_error.py and closed_client_error.py raise the exceptions the troubleshooting section describes.

Two notes on the contents:

  • requirements.txt pins httpx2[http2] so http2_client.py works out of the box. The tutorial installs the extra later on, once it reaches the HTTP/2 section.
  • The tutorial's fourth error demo — calling httpx2.Client(http2=True) without the http2 extra — isn't included, since it can't raise from a folder whose requirements install that extra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant