On Sun, Nov 11, 2012 at 12:09 PM, Shaun A. <lists / ruby-forum.com> wrote:
> Hi Hassan,
>
> Thanks for the reply. I have read and re-read the NET::HTTP docs and it
> doesn't do what I want because it was showing all the parameters as
> hashes. I was trying to send three values as a hash and one as a string
> and I couldn't mash them together. I ended up figuring it out and I need
> to create the url myself rather than using any of the 'easy' methods.
>
> This is what ended up working:
>
> data = "dst=#{dst}&type=#{type}&id=#{id}&#{data_array.join}"
> resp, data = http.post(path, data)
> p resp.body

Hi, Shaun,

I'm looking here:
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html#method-i-post
and it shows that data must be a string. What documentation are you
looking at?