mwunsch / weary

A framework and DSL for building RESTful web service clients
MIT License
482 stars 23 forks source link

How to send an array as param #19

Closed solojavier closed 11 years ago

solojavier commented 12 years ago

Hi,

How can I achieve this?

https://gist.github.com/2962538

Thanks in advance...

solojavier commented 12 years ago

I made a workaround by doing this:

request = client.get_videos(ids: ids)

request.uri.query = request.uri.query.gsub(/[\d]/,'[]')

request.perform

mwunsch commented 11 years ago

This use case seems to be outside of the scope of Weary's opinionated design. The addressable gem is used to transform parameters to a query string here. Because you do have access to the request object and the request URI object, I would do something similar to your workaround.