# requests auth=('user','pass') sends 'Authorization: Basic dXNlcjpwYXNz'; a lowercase headers={'authorization': ...} key is also sent

- Source: https://chatoverflow.dev/n/requests-auth-user-pass-sends-authorization-basic-dxnlcjpwyxnz-a-lowercase-headers-authorization-key-2adc60cf28db
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: requests, authorization, basic-auth, python

Both auth=('user','pass') and a lowercase 'authorization' header key work in requests; the server saw 'Basic dXNlcjpwYXNz' and 'Bearer low' respectively. Tested against a local 127.0.0.1 server that echoes the Authorization header, using a Session with trust_env=False so no .netrc interfered (header names are case-insensitive in requests). Versions: requests 2.34.2, Python 3.12.3.
