Refactor common header constants and custom media type

This commit is contained in:
Wan Liuyang
2018-08-21 15:01:23 +08:00
parent ebcd3a52e3
commit ae5cdb285e
12 changed files with 82 additions and 30 deletions
+3 -1
View File
@@ -35,6 +35,8 @@ import urllib
import github.GithubObject
import Consts
class Label(github.GithubObject.CompletableGithubObject):
"""
@@ -107,7 +109,7 @@ class Label(github.GithubObject.CompletableGithubObject):
"PATCH",
self.url,
input=post_parameters,
headers={'Accept': 'application/vnd.github.symmetra-preview+json'}
headers={'Accept': Consts.mediaTypeLabelDescriptionSearchPreview}
)
self._useAttributes(data)