]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Update HTTP/2 docs
authorTom Christie <tom@tomchristie.com>
Fri, 22 May 2020 09:16:08 +0000 (10:16 +0100)
committerTom Christie <tom@tomchristie.com>
Fri, 22 May 2020 09:16:08 +0000 (10:16 +0100)
docs/http2.md

index d68a908d49cd3440e8bf1ba45abf58853882a13c..45a08cdec0f2d55e7a3f6d38bba804f720061826 100644 (file)
@@ -18,12 +18,10 @@ For a comprehensive guide to HTTP/2 you may want to check out "[HTTP2 Explained]
 
 ## Enabling HTTP/2
 
-The HTTPX client provides HTTP/2 support, **which is currently only available with the async client**.
-
-HTTP/2 support is not enabled by default, because HTTP/1.1 is a mature,
-battle-hardened transport layer, and our HTTP/1.1 may be considered the more robust
-option at this point in time. It is possible that a future version of `httpx` may
-enable HTTP/2 support by default.
+When using the `httpx` client, HTTP/2 support is not enabled by default, because
+HTTP/1.1 is a mature, battle-hardened transport layer, and our HTTP/1.1
+implementation may be considered the more robust option at this point in time.
+It is possible that a future version of `httpx` may enable HTTP/2 support by default.
 
 If you're issuing highly concurrent requests you might want to consider
 trying out our HTTP/2 support. You can do so by instantiating a client with
@@ -43,6 +41,10 @@ async with httpx.AsyncClient(http2=True) as client:
     ...
 ```
 
+HTTP/2 support is available on both `Client`, and `AsyncClient`, although it's
+typically more useful in async contexts if you're issuing lots of concurrent
+requests.
+
 ## Inspecting the HTTP version
 
 Enabling HTTP/2 support on the client does not *necessarily* mean that your