Accessing POST Data from WSGI

后端 未结 5 676
萌比男神i
萌比男神i 2020-12-08 00:45

I can\'t seem to figure out how to access POST data using WSGI. I tried the example on the wsgi.org website and it didn\'t work. I\'m using Python 3.0 right now. Please don\

5条回答
  •  借酒劲吻你
    2020-12-08 01:22

    This worked for me (in Python 3.0):

    import urllib.parse
    
    post_input = urllib.parse.parse_qs(environ['wsgi.input'].readline().decode(),True)
    

提交回复
热议问题