

def _refresh(self, request):
    'Refresh the access_token using the refresh_token.\n\n    Args:\n      request: The atom.http_core.HttpRequest which contains all of the\n          information needed to send a request to the remote server.\n    '
    body = urllib.urlencode({
        'grant_type': 'refresh_token',
        'client_id': self.client_id,
        'client_secret': self.client_secret,
        'refresh_token': self.refresh_token,
    })
    headers = {
        'user-agent': self.user_agent,
    }
    http_request = atom.http_core.HttpRequest(uri=self.token_uri, method='POST', headers=headers)
    http_request.add_body_part(body, mime_type='application/x-www-form-urlencoded')
    response = request(body)
    body = response.read()
    if (response.status == 200):
        self._extract_tokens(body)
    else:
        self._invalid = True
    return response

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py OAuth2Token._refresh/VarMisuse@102/227 `http_request`->`body`