Change the Accept header to current github api recommedation

This commit is contained in:
Kovid Goyal 2022-11-20 07:22:00 +05:30
parent c6dd6ccc68
commit 4290a8f9ba
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -255,7 +255,7 @@ class GitHub(Base): # {{{
self.is_nightly = self.current_tag_name == 'nightly'
self.requests = s = requests.Session()
s.auth = (self.username, self.password)
s.headers.update({'Accept': 'application/vnd.github.v3+json'})
s.headers.update({'Accept': 'application/vnd.github+json'})
self.url_base = f'{self.API}/repos/{self.username}/{self.reponame}/releases'
def patch(self, url: str, fail_msg: str, **data: Any) -> None: