Is there a way to get a `Map` (or similar data str...
# http4k
m
Is there a way to get a
Map
(or similar data structure) of all query parameteres in a request? I need to deal with dynamic query parameters.
d
Request(Method._GET_, "").uri._queries_()
m
request.uri._queries_()._toParametersMap_()
seems to do what I need. But why is the type
Map<String, List<String?>>
and not
Map<String, List<String>>
?
d
because queries don't have to have a value
m
So like
/foo?q1=&q2=bar
, then
q1
will be
null
? Or empty string?
d
try it out! 🙂
m
Seems to be empty string. So when will it be null?
d
"<http://asd/asd?a&b=c&c=>"
m
Ah, right.