'Append an OAuth 2 token to the request.
Note that currently HTTPS is required for all requests. There may be
a token type that allows for plain HTTP in the future and then this
should be updated to allow plain HTTP on a white list basis.'

def __call__(self, r):

    if (not is_secure_transport(r.url)):
        raise InsecureTransportError()
    (r.url, r.headers, r.body) = self._client.add_token(r.url, http_method=r.method, body=r.body, headers=r.headers)
    return r
