Right now, if I pass a URL “argument” with no value (a flag?) to a web service script, the script receives it in a pretty unintuitive form.
For instance, if I call http://deadlinepulse/SomeScript?foo=one&bar=5&spangle
, the dict I get in my script looks like this (after the .NET types have been translated):
{'foo': 'one',
'bar': '5',
'unnamedkeyvaluepair0': 'spangle'}
I had a couple of different ideas that I think would improve the handling of these “flag” arguments.
One would be to keep the the value-less arguments in the same argument dict, but store them more like flags, so the args passed from the query above would instead look like this:
{'foo': 'one',
'bar': '5',
'spangle': True} # Or maybe 1
The other idea would be to actually pass the flags to the script in a third argument as a tuple of strings, rather than including them in the dict.
Thoughts on either idea?