Skip to content

Extensions docs#3080

Merged
lovelydinosaur merged 20 commits intomasterfrom
extensions-docs
Feb 6, 2024
Merged

Extensions docs#3080
lovelydinosaur merged 20 commits intomasterfrom
extensions-docs

Conversation

@lovelydinosaur
Copy link
Copy Markdown
Contributor

@lovelydinosaur lovelydinosaur 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

@lovelydinosaur lovelydinosaur added the docs Changes to the documentation label Feb 2, 2024
@lovelydinosaur lovelydinosaur marked this pull request as ready for review February 2, 2024 13:30
@lovelydinosaur lovelydinosaur 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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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)

Comment thread docs/advanced/extensions.md Outdated
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
@lovelydinosaur lovelydinosaur merged commit c51af4b into master Feb 6, 2024
@lovelydinosaur lovelydinosaur 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>
samclearman pushed a commit to titanmsp/httpx that referenced this pull request Apr 26, 2025
* 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