How to parse the “request body” using python CGI?

前端 未结 2 938
醉梦人生
醉梦人生 2021-02-08 06:11

I just need to write a simple python CGI script to parse the contents of a POST request containing JSON. This is only test code so that I can test a client application until th

2条回答
  •  梦谈多话
    2021-02-08 06:54

    notice that if you call cgi.FieldStorage() before in your code, you can't get the body data from stdin, because it just be read once.

提交回复
热议问题