]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Expose ASGIDispatch & WSGIDispatch in the 'dispatch' namespace. (#407)
authorAhmed Maher <mx252628@gmail.com>
Sat, 28 Sep 2019 19:55:19 +0000 (22:55 +0300)
committerSeth Michael Larson <sethmichaellarson@gmail.com>
Sat, 28 Sep 2019 19:55:19 +0000 (14:55 -0500)
docs/advanced.md
httpx/dispatch/__init__.py

index 6acad3b67bbfa491bf8244a86f953644262b1021..99fbb651571a776a3e29a951fd2fd8860e13b8dc 100644 (file)
@@ -53,7 +53,7 @@ For example:
 
 ```python
 # Instantiate a client that makes WSGI requests with a client IP of "1.2.3.4".
-dispatch = httpx.WSGIDispatch(app=app, remote_addr="1.2.3.4")
+dispatch = httpx.dispatch.WSGIDispatch(app=app, remote_addr="1.2.3.4")
 client = httpx.Client(dispatch=dispatch)
 ```
 
index 4057d6ead5d501241482421797e1088e73d9a026..3089371fd3ae1018c8ef43984df0a21198ec7c65 100644 (file)
@@ -2,3 +2,7 @@
 Dispatch classes handle the raw network connections and the implementation
 details of making the HTTP request and receiving the response.
 """
+from .asgi import ASGIDispatch
+from .wsgi import WSGIDispatch
+
+__all__ = ["ASGIDispatch", "WSGIDispatch"]