Closed alpmestan closed 10 years ago
LGTM, please merge.
Yeah, maybe we'll have to extend a bit the flag thing to make it accept true
/false
. Sounds reasonable. I'm merging this PR and we can add that later.
Very good, thanks.
Alright, I took another stab at this, to extend QueryFlag
.
What do you think about:
param = case lookup paramname querytext of
Just Nothing -> True -- param is there, with no value
Just (Just v) -> examine v -- param with a value
Nothing -> False -- param not in the query string
where examine v | v == "true" || v == "1" || v == "" = True
| otherwise = False
Yes, I like it.
Ok, I'll push a patch for that along with an additional test on new-impl
.
This addresses #19 and also adds a
QueryFlag
param for value-less GET parameters. Comes with server, client & docs support, along with some tests.