We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d72373c commit d25c00aCopy full SHA for d25c00a
1 file changed
python_http_client/client.py
@@ -212,17 +212,15 @@ def http_request(*_, **kwargs):
212
# Don't serialize to a JSON formatted str if we don't have
213
# a JSON Content-Type
214
if 'Content-Type' in self.request_headers:
215
- if (self.request_headers['Content-Type']
216
- != 'application/json'):
+ if (self.request_headers['Content-Type'] !=
+ 'application/json'):
217
data = kwargs['request_body'].encode('utf-8')
218
else:
219
data = json.dumps(
220
- kwargs['request_body']
221
- ).encode('utf-8')
+ kwargs['request_body']).encode('utf-8')
222
223
224
225
226
params = (kwargs['query_params']
227
if 'query_params' in kwargs
228
else None)
0 commit comments