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

Extensions docs #3080

Merged
merged 20 commits into from Feb 6, 2024
Merged

Extensions docs #3080

merged 20 commits into from Feb 6, 2024

Conversation

tomchristie
Copy link
Member

@tomchristie tomchristie commented Feb 2, 2024

Closes #2599.

Mostly cribbed from the httpcore documentation.

  • I've re-ordered the request timeout to reflect it as a lower priority in this case. Users should be using the timeout=... API with httpx.
  • The network_stream docs don't currently include a CONNECT example. In order to support this we'd need to be able to specify the request target explicitly, since we currently only support requests that use the standard HTTP/1.1 abs-path. Supporting a target request extension would allow us to support OPTIONS * requests, proxy absolute-url requests, non-standard path quoting and CONNECT requests.
  • The network_stream docs don't currently include an Upgrade example. This discussion correctly identifies that we need to handle the h11 tailing_data in order to properly support that. See Support connection Upgrade and CONNECT. httpcore#872

@tomchristie tomchristie added the docs Changes to the documentation label Feb 2, 2024
@tomchristie tomchristie marked this pull request as ready for review February 2, 2024 13:30
@tomchristie tomchristie requested a review from a team February 2, 2024 15:41
Comment on lines +75 to +96
**Establishing the connection**

* `"connection.connect_tcp"`
* `"connection.connect_unix_socket"`
* `"connection.start_tls"`

**HTTP/1.1 events**

* `"http11.send_request_headers"`
* `"http11.send_request_body"`
* `"http11.receive_response"`
* `"http11.receive_response_body"`
* `"http11.response_closed"`

**HTTP/2 events**

* `"http2.send_connection_init"`
* `"http2.send_request_headers"`
* `"http2.send_request_body"`
* `"http2.receive_response_headers"`
* `"http2.receive_response_body"`
* `"http2.response_closed"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we shouldn't list all of the supported events here. We should remember to update this list every time we introduce a new event to httpcore. We could simply mention them in httpcore and provide a link here.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(an automatic workflow here would also help - mkdocs plugins are easy to implement)

Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
@tomchristie tomchristie merged commit c51af4b into master Feb 6, 2024
5 checks passed
@tomchristie tomchristie deleted the extensions-docs branch February 6, 2024 10:40
shepilov-vladislav pushed a commit to shepilov-vladislav/httpx that referenced this pull request Mar 28, 2024
* Deprecate app=... in favour of explicit WSGITransport/ASGITransport

* Linting

* Linting

* Update WSGITransport and ASGITransport docs

* Deprecate app

* Drop deprecation tests

* Add CHANGELOG

* Deprecate 'app=...' shortcut, rather than removing it.

* Update CHANGELOG

* Fix test_asgi.test_deprecated_shortcut

* Extensions docs

* Include 'extensions' in docs index

* Update docs/advanced/extensions.md

Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>

---------

Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Changes to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the extensions API.
3 participants