mwunsch / weary

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

PUT with params #23

Closed mderar closed 12 years ago

mderar commented 12 years ago

I have the following code:

class Client < Weary::Client
  put :update, "/products/{id}"
end

How can I send a params hash to update a specific product? i.e. I need to be able to do something like:

client.update :id=>'3', params
mwunsch commented 12 years ago

You would add the additional params using the optional method of a resource:

put :update, "/products/{id}" do |r|
    r.optional :expected_keys 
end