I am trying to pass a json representation to a set_form_data and am running into following error:
undefined method `map' for "{\"first_name\":\"bill\",\"last_name\":\"gates\"}":String
Here is how I create the request:
Net::HTTP::Post.new(uri.request_uri).set_form_data({"first_name" => "steve","last_name" => "jobs"}.to_json)
Anything I am missing ?
The error comes from the line:
/jruby/jruby-1.6.2/lib/ruby/1.9/net/http.rb:1593:in `set_form_data'