Print raw HTTP request in Flask or WSGI

前端 未结 7 1227
名媛妹妹
名媛妹妹 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条回答
  •  梦毁少年i
    2021-02-01 13:16

    you probably want something like

    print(request.headers)
    print(request.data)
    print(request.args)
    print(request.form)
    print(request.endpoint)
    print(request.method)
    print(request.remote_addr)
    

提交回复
热议问题