From: akgnah Date: Fri, 23 Feb 2024 14:33:15 +0000 (+0800) Subject: fix docs basic authentication typo (#3112) X-Git-Tag: 0.27.1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df5345140e09ac6c2de0d9589bcd6f3e31c6aa3f;p=thirdparty%2Fhttpx.git fix docs basic authentication typo (#3112) Signed-off-by: akgnah <1024@setq.me> Co-authored-by: Tom Christie --- diff --git a/docs/advanced/authentication.md b/docs/advanced/authentication.md index edcc15f8..63d26e5f 100644 --- a/docs/advanced/authentication.md +++ b/docs/advanced/authentication.md @@ -1,7 +1,7 @@ Authentication can either be included on a per-request basis... ```pycon ->>> auth = httpx.BasicAuthentication(username="username", password="secret") +>>> auth = httpx.BasicAuth(username="username", password="secret") >>> client = httpx.Client() >>> response = client.get("https://www.example.com/", auth=auth) ``` @@ -9,7 +9,7 @@ Authentication can either be included on a per-request basis... Or configured on the client instance, ensuring that all outgoing requests will include authentication credentials... ```pycon ->>> auth = httpx.BasicAuthentication(username="username", password="secret") +>>> auth = httpx.BasicAuth(username="username", password="secret") >>> client = httpx.Client(auth=auth) >>> response = client.get("https://www.example.com/") ``` @@ -19,7 +19,7 @@ Or configured on the client instance, ensuring that all outgoing requests will i HTTP basic authentication is an unencrypted authentication scheme that uses a simple encoding of the username and password in the request `Authorization` header. Since it is unencrypted it should typically only be used over `https`, although this is not strictly enforced. ```pycon ->>> auth = httpx.BasicAuthentication(username="finley", password="secret") +>>> auth = httpx.BasicAuth(username="finley", password="secret") >>> client = httpx.Client(auth=auth) >>> response = client.get("https://httpbin.org/basic-auth/finley/secret") >>> response