rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

HTTP Nested params working? #277

Closed craigsheen closed 11 years ago

craigsheen commented 11 years ago

Hi,

Great gem!

However do nested params work? I can't seem to find any tests and I cant get them working.

I have tried numerous ways, using JSON and using normal nested params and neither have worked.

    BW::HTTP.post("http://localhost:3000/new_gas_assessment", {payload: '"gas_assessment"=>"01/01/2013","well1"=>{"well_id"=>"ws201","date_taken"=>"22/07/2013"}'}) do |response|
      puts response
    end

Parameters: {"\"gas_assessment\""=>">\"01/01/2013\",\"well1\"=>{\"well_id\"=>\"ws201\",\"date_taken\"=>\"22/07/2013\"}"}

Thanks.

craigsheen commented 11 years ago

Nevermind I've managed to find this on an old closed issue. Maybe the readme could be updated to explain this a bit further? #219 is the issue and pull request which explain it in the test.