fix for #187 failure when using RFC 6902 json-patch operation

This commit is contained in:
Benjamin Sherman 2017-04-27 21:08:50 -05:00 committed by mbohlool
parent 78790ac0f2
commit 80831d0a3f

View File

@ -154,8 +154,8 @@ class RESTClientObject(object):
if query_params:
url += '?' + urlencode(query_params)
if headers['Content-Type'] == 'application/json-patch+json':
headers[
'Content-Type'] = 'application/strategic-merge-patch+json'
if not isinstance(body, list):
headers['Content-Type'] = 'application/strategic-merge-patch+json'
request_body = None
if body:
request_body = json.dumps(body)