I need to get the body of a POST
request with Content-Type: application/x-www-form-urlencoded
in a Connexion API handler. The accepted answer here suggests to use request.get_data()
, however this always returns just b''
for me. My guess is that Connexion parses the data before request.get_data()
gets called and that is causing the issue.
How do I get the raw request payload in this case? If there's no way to get it directly, how do I properly reconstruct it from request.form
(which seems to contain the parsed data)?