From: Aruna Chinnamuthu Date: 2010-09-07T15:08:44+09:00 Subject: how to send multiple parameters in the req.set_form_data Hi , I am writing ruby code for calling APIs .. i am writing the POST request form . require 'net/http' require 'uri' url = URI.parse('http://localhost:3000/api/blogs/create.xml') req = Net::HTTP::Post.new(url.path) req.basic_auth 'a', 'a' req.set_form_data({'blogpost[title]' => 'TestingAPIBlogposttitle' , 'blogpost[description]' => 'Testing api desc' }) res = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) } case res when Net::HTTPSuccess, Net::HTTPRedirection puts res.body else res.error! end This shows me an error like /usr/lib/ruby/1.8/net/http.rb:2101:in `error!': 422 "" (Net::HTTPServerException) from post_req.rb:13 My Table Structure is like Blogpost(id,title,slug,description,created_at,category) -- Posted via http://www.ruby-forum.com/.