* Basic authentication. * Adds Authorization: Basic header to request * Example: * --- * import requests; * void main() { * rq = Request(); * rq.authenticator = new BasicAuthentication("user", "passwd"); * rs = rq.get("http://httpbin.org/basic-auth/user/passwd"); * } * ---
Constructor.
create Basic Auth header
return user password
returns username
See Implementation
* Basic authentication. * Adds Authorization: Basic header to request * Example: * --- * import requests; * void main() { * rq = Request(); * rq.authenticator = new BasicAuthentication("user", "passwd"); * rs = rq.get("http://httpbin.org/basic-auth/user/passwd"); * } * ---