Here are the examples of the python api django.utils.six.moves.urllib.request.HTTPBasicAuthHandler.auth_header taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: reviewboard
Source File:
View license
    def _build_request(self, url, body=None, headers={}, username=None,
                       password=None, method='GET'):
        """Build a URLRequest object, including HTTP Basic auth"""
        r = URLRequest(url, body, headers, method=method)

        if username is not None and password is not None:
            auth_key = username + ':' + password
                         'Basic %s' %

        return r