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 Jan 3, 2024
1 parent e6cbc94 commit dbeb44c
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"

elif "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 dbeb44c

Please sign in to comment.