I want to know whats the difference between FieldStorage in Python and wsgi_input?
I want to know whats the difference between FieldStorage in Python and wsgi_input?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
FieldStorageis useful inCGIcontexts and can help in some other cases in which you want to do your own parsing and handling of (e.g.) a form posted (or also sent by a GET;-) to your server, without necessarily involvingWSGIin any way. It provided a nicely accessible, somewhat dict-like object for accessing the form data (whether in a POST or GET context).I’m not sure what
wsgi_input(with an underscore) is; if you meanwsgi.input(with a dot, and, normally, quotes around it;-), it’s a key in a WSGI environment whose value must be, quoting from PEP 333:So it only exists in a WSGI context and does not imply that any parsing of that request body has been done — parsing of the request body (to receive POSTs, specifically), if any, must happen “using” that stream.