Query param via List[(String,String)] instead of Map[String,String]?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Query param via List[(String,String)] instead of Map[String,String]?

Strom
Is there any way to build the query params added by a list instead of a map? Some of the requests I'm using require the same query parameter name multiple times, and this isn't possible with map.

I'm trying to do something like this:
http://site.com?cat=music&cat=books
Reply | Threaded
Open this post in threaded view
|

Re: Query param via List[(String,String)] instead of Map[String,String]?

n8han
Administrator
For now the only way would be to construct the query string directly and append it to the path. I never thought about repeating parameters this way, but I could add support for it. I wonder how it should be represented in an OAuth signature base string. :\

Nathan
Reply | Threaded
Open this post in threaded view
|

Re: Query param via List[(String,String)] instead of Map[String,String]?

Strom
If it's too much of a pain, don't bother; I've figured out a bit of a workaround for it. I would never use repeated query params if it were my own thing (isn't that just weird?), but this is how the API spec is for the tools I'm using.