1

I have a JavaScript client program (Angular) which is sending a JSON encoded parameter via a GET Http Request. This parameter is not sent as part of the query string, but rather in the message body.

Is it possible for flask to provide support for extracting this type of parameter from a GET request? If so, what API just be used? All the examples I have seen online are the POST requests.

pcolag
  • 161
  • 1
  • 5
  • Does this answer your question? [Get the data received in a Flask request](https://stackoverflow.com/questions/10434599/get-the-data-received-in-a-flask-request) – Jon Mar 04 '20 at 14:54
  • The threads above relate to a POST request. My question is in the context of a GET request. – pcolag Mar 04 '20 at 15:22
  • 1
    The example in the question of the other thread has a route supporting both GET and POST. I'm not sure there is a syntax difference between how to get a body for either of them. – Jon Mar 04 '20 at 15:37
  • Pass the data as url encoded. – Neeraj Sonaniya Mar 04 '20 at 17:52
  • Url encoding will work only for smaller JSON objects. There is a 4000 character limit on URL length – pcolag Mar 05 '20 at 00:28

0 Answers0