How to get the content length of a GET request in flask

Viewed 3305

I'm trying to write some wrapper function that would first check the size of the request and if the request size is larger than what I expected, a specific content would return to the client. I tried to use request.content_length before, and it worked when the request is a POST request, but can not work for a GET request. Is there a way to do that?

1 Answers
Related