I have a web app that loads data sources from provided GET parameters. The application can take any number of data sources, such as:
mysite.com/?feed=http://foo.com&feed=http://bar.com
These feed values can be URL encoded or not. My app polls these data sources at a given interval. I'd like to allow the user to optionally enter a polling interval via another GET param.
What's the proper way to provide a GET parameter that relates to another GET parameter? I'm thinking of using commas:
mysite.com/?feed=http://foo.com,interval=1&feed=http://bar.com,interval=5
In my application, I would parse the values and detect that interval=5 would relate to feed=http://foo.com. Something about this seems a bit smelly. I don't know if I've ever seen this done before. Are commas a bad idea?
Note: It is possible for a feed to NOT have a corresponding interval (relying on an internal default instead). Consider the following:
mysite.com/?feed=http://foo.com,interval=1&feed=http://blah&feed=http://bar.com,interval=5