Skip to content
Advertisement

Print raw HTTP request in Flask or WSGI

I am debugging a microcontroller I’ve built which is writing raw HTTP requests line by line. I am using Flask for my backend and I would like to see the entire request as it appears in this format:

JavaScript

I know Flask is based on WSGI. Is there anyway to get this to work with Flask?

Advertisement

Answer

With flask you have access to the request object which contains all the HTTP details:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement