Parse http GET and POST parameters from BaseHTTPHandler?

You may want to use urllib.parse:

>>> from urllib.parse import urlparse, parse_qs
>>> url="http://example.com/?foo=bar&one=1"
>>> parse_qs(urlparse(url).query)
{'foo': ['bar'], 'one': ['1']}

For Python 2, the module is named urlparse instead of url.parse.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)