I am unable to successfully define a regex to handle url GET parameters such ads:
Code: Select all
http://mydevice/?x=1&y=2&z=3
Code: Select all
def json(req,resp):
yield from picoweb.jsonify(resp,{"error":True})
ROUTES = [
(re.compile("^/\?.*"), json),
("/", lambda req, resp: (yield from app.sendfile(resp, path+"index.htm"))),
(re.compile("^/(.+)"), lambda req, resp: (yield from app.sendfile(resp, path + req.url_match.group(1)))),
]