Skip to content

Commit

Permalink
feat: Only override content-type if it is none
Browse files Browse the repository at this point in the history
* Only override content-type if it is none
  • Loading branch information
rmkeezer committed Apr 10, 2020
1 parent d9aa1d4 commit b1177f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibm_cloud_sdk_core/base_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ def prepare_request(self,

if data and isinstance(data, dict):
data = remove_null_values(data)
headers.update({'content-type': 'application/json'})
if headers.get('content-type') is None:
headers.update({'content-type': 'application/json'})
data = json_import.dumps(data)
request['data'] = data

Expand Down

0 comments on commit b1177f2

Please sign in to comment.