Skip to content
Myr

fix docs basic authentication typo (#3112)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by akgnah · committed by GitHub · parent fc84f7f · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: akgnah <1024@setq.me>
  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/advanced/authentication.md+3 added-3 removed
1Authentication can either be included on a per-request basis...23```pycon4>>> auth = httpx.BasicAuthentication(username="username", password="secret")4>>> auth = httpx.BasicAuth(username="username", password="secret")5>>> client = httpx.Client()6>>> response = client.get("https://www.example.com/", auth=auth)7```89Or configured on the client instance, ensuring that all outgoing requests will include authentication credentials...1011```pycon12>>> auth = httpx.BasicAuthentication(username="username", password="secret")12>>> auth = httpx.BasicAuth(username="username", password="secret")13>>> client = httpx.Client(auth=auth)14>>> response = client.get("https://www.example.com/")15```16
1 unmodified line
1819HTTP 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.2021```pycon22>>> auth = httpx.BasicAuthentication(username="finley", password="secret")22>>> auth = httpx.BasicAuth(username="finley", password="secret")23>>> client = httpx.Client(auth=auth)24>>> response = client.get("https://httpbin.org/basic-auth/finley/secret")25>>> response26<Response [200 OK]>
206 unmodified lines