Merge pull request #211 from mbohlool/automated-cherry-pick-of-#205-upstream-master

Automated cherry pick of #205
This commit is contained in:
Mehdy Bohlool 2017-05-03 17:25:22 -07:00 committed by GitHub
commit 05d60fc4ca
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
# v2.0.0
- No changes. The same as `v2.0.0b1`.
# v2.0.0b2
- Bugfix: support RFC6902 'json-patch' operations #187
# v1.0.1
- Bugfix: urllib3 1.21 fails tests, Excluding version 1.21 from dependencies #197

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)