-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
difficulty/easyEasy issue (less than one day)Easy issue (less than one day)
Description
When I was pushing data with a post to an API who wasn't returning a body. The client have a problem:
self._helper.post(request, data=project_header)
File "/usr/local/lib/python3.6/dist-packages/deepomatic/api/http_helper.py", line 307, in post
return self.make_request(self.session.post, resource, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/deepomatic/api/http_helper.py", line 286, in make_request
elif 'application/json' in response.headers['Content-Type']:
File "/usr/local/lib/python3.6/dist-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-type'
This can be reproduce by having an API returning with drf something such as: (the API is wrong aswell)
return Response(status_code=201)
Metadata
Metadata
Assignees
Labels
difficulty/easyEasy issue (less than one day)Easy issue (less than one day)