]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Update `verify` parameter description (#1575)
authorascopes <73482956+ascopes@users.noreply.github.com>
Fri, 16 Apr 2021 09:03:08 +0000 (10:03 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Apr 2021 09:03:08 +0000 (10:03 +0100)
Included that the verify parameter can be an SSL context, as it currently is missing information
that is present in the advanced usage section of the documentation, and the type hints are not
showing up in the interface specification.

Amend verify docs for client

httpx/_api.py
httpx/_client.py

index 8cfaf6dfda3269c007837e71a1f35b2f1cc6a6c7..7722111dc5e68377c4fa3af035ada7f8ffef87a7 100644 (file)
@@ -68,7 +68,8 @@ def request(
     * **allow_redirects** - *(optional)* Enables or disables HTTP redirects.
     * **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
     verify the identity of requested hosts. Either `True` (default CA bundle),
-    a path to an SSL certificate file, or `False` (disable verification).
+    a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+    (which will disable verification).
     * **cert** - *(optional)* An SSL certificate used by the requested host
     to authenticate the client. Either a path to an SSL certificate file, or
     two-tuple of (certificate file, key file), or a three-tuple of (certificate
index ce466aa3a48d41b4031fe55ce511c46489bab479..dde2fec03fe1a78d54058988d44293455ede828f 100644 (file)
@@ -546,7 +546,8 @@ class Client(BaseClient):
     sending requests.
     * **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
     verify the identity of requested hosts. Either `True` (default CA bundle),
-    a path to an SSL certificate file, or `False` (disable verification).
+    a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+    (which will disable verification).
     * **cert** - *(optional)* An SSL certificate used by the requested host
     to authenticate the client. Either a path to an SSL certificate file, or
     two-tuple of (certificate file, key file), or a three-tuple of (certificate