def _do_refresh_request(self, http):
body = self._generate_refresh_request_body()<EOL>headers = self._generate_refresh_request_headers()<EOL>logger.info('<STR_LIT>')<EOL>resp, content = transport.request(<EOL>http, self.token_uri, method='<STR_LIT:POST>',<EOL>body=body, headers=headers)<EOL>content = _helpers._from_bytes(content)<EOL>if resp.status == http_client.OK:<EOL><INDENT>d = json.loads(content)<EOL>self.token_response = d<EOL>self.access_token = d['<STR_LIT>']<EOL>self.refresh_token = d.get('<STR_LIT>', self.refresh_token)<EOL>if '<STR_LIT>' in d:<EOL><INDENT>delta = datetime.timedelta(seconds=int(d['<STR_LIT>']))<EOL>self.token_expiry = delta + _UTCNOW()<EOL><DEDENT>else:<EOL><INDENT>self.token_expiry = None<EOL><DEDENT>if '<STR_LIT>' in d:<EOL><INDENT>self.id_token = _extract_id_token(d['<STR_LIT>'])<EOL>self.id_token_jwt = d['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>self.id_token = None<EOL>self.id_token_jwt = None<EOL><DEDENT>self.invalid = False<EOL>if self.store:<EOL><INDENT>self.store.locked_put(self)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.info('<STR_LIT>', content)<EOL>error_msg = '<STR_LIT>'.format(resp.status)<EOL>try:<EOL><INDENT>d = json.loads(content)<EOL>if '<STR_LIT:error>' in d:<EOL><INDENT>error_msg = d['<STR_LIT:error>']<EOL>if '<STR_LIT>' in d:<EOL><INDENT>error_msg += '<STR_LIT>' + d['<STR_LIT>']<EOL><DEDENT>self.invalid = True<EOL>if self.store is not None:<EOL><INDENT>self.store.locked_put(self)<EOL><DEDENT><DEDENT><DEDENT>except (TypeError, ValueError):<EOL><INDENT>pass<EOL><DEDENT>raise HttpAccessTokenRefreshError(error_msg, status=resp.status)<EOL><DEDENT>
Refresh the access_token using the refresh_token.

        Args:
            http: an object to be used to make HTTP requests.

        Raises:
            HttpAccessTokenRefreshError: When the refresh fails.