Print raw HTTP request in Flask or WSGI

前端 未结 7 1232
名媛妹妹
名媛妹妹 2021-02-01 13:05

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 a

7条回答
  •  囚心锁ツ
    2021-02-01 13:07

    suppose if you want complete details,

    There is an another way

    @app.route('/')
    def index():
        print request.__dict__
        #this prints all variables in `dict` format including `headers`
    

提交回复
热议问题