Flask - How do I read the raw body in a POST request when the content type is "application/x-www-form-urlencoded"
Use request.get_data() to get the POST data.  This works independent of whether the data has content type application/x-www-form-urlencoded or application/octet-stream.
Turns out that Flask sets request.data to an empty string if the content type of the request is application/x-www-form-urlencoded. Since I'm using a JSON body request, I just want to parse the json or force Flask to parse it and return request.json.
This is needed because changing the AJAX content type forces an HTTP OPTION request, which complicates the back-end.
How do I make Flask return the raw data in the request object?