Created
December 18, 2017 14:11
-
-
Save josuebrunel/3e9e421333a27902656ed7e0b776e7c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cgi | |
def parse_form_data(formdata): | |
fp = cgi.StringIO(formdata) | |
env = cgi.os.environ | |
env['REQUEST_METHOD'] = 'POST' | |
data = cgi.FieldStorage(fp, environ=env) | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example