I have a simple server that will return JSON to a user. I want the to provide some inputs to the service, so I use query parameters:
/path?paramName=paramValue¶mName2=paramValue2....¶mNamen=paramValuen
In Python, what is the best way of parsing out these parameters?
My server is a threaded server defined as such:
class ThreadingSimpleServer(SocketServer.ThreadingMixIn,
BaseHTTPServer.HTTPServer):
""" simple threaded server """
pass
In my request handler, I implemented a do_GET().
Should I have this function split based on the ? to separate out the path from the parameters and then split again on the & or is there a better way to do this?