Skip to content

Commit

Permalink
paths.py: add support for sending data of multipart/form-data type
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Revsbech committed Dec 8, 2023
1 parent e6cbc94 commit b357f1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openapi3/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ def _request_handle_body(self, data):

self._request.data = body
self._request.headers["Content-Type"] = "application/json"

if "multipart/form-data" in self.requestBody.content:
self._request.data = data
self._request.headers["Content-Type"] = data.content_type

else:
raise NotImplementedError()

Expand Down

0 comments on commit b357f1e

Please sign in to comment.