From: ascopes <73482956+ascopes@users.noreply.github.com> Date: Fri, 16 Apr 2021 09:03:08 +0000 (+0100) Subject: Update `verify` parameter description (#1575) X-Git-Tag: 0.18.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4870cb5adf63f4377a71c0b5bef6146fcdb53a9c;p=thirdparty%2Fhttpx.git Update `verify` parameter description (#1575) 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 --- diff --git a/httpx/_api.py b/httpx/_api.py index 8cfaf6df..7722111d 100644 --- a/httpx/_api.py +++ b/httpx/_api.py @@ -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 diff --git a/httpx/_client.py b/httpx/_client.py index ce466aa3..dde2fec0 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -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