def _post(self, endpoint, post_data=None):
response = requests.request('POST',
url='{}/{}'.format(self._api_root, endpoint),
headers={'Content-Type': 'application/json',
'Accept': 'application/json'},
auth=(self._login + '/token', self._token),
json=post_data)
if response.status_code in (httplib.OK, httplib.CREATED):
return response.json()
raise APIError(response.text, response.status_code)
zendesk_localization.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录