mureq
mureq copied to clipboard
Add support for auth parameter
python-requests supports passing an auth object, example:
r = request(method, url, auth=("user", "password"))
It detects basic authentication and builds the Basic {b64encoded} Authentication header for you
It would be nice if mureq also supported this, to more easily replace requests in scripts that make use of auth
Thanks for the suggestion. I'll consider it, but I'm thinking I probably won't do this:
- It's fairly easy for clients to build the
Authorizationheader themselves in this case. - mureq cannot support the fully general use case of the
authparameter (an arbitrarily callable that mutates therequests.Requestobject), since it has no analogue of therequests.Requestsclass.
Understandable, thanks