I am dealing with a third-party api here and I need to send HTTP Post request represented in XML. How should I go about doing this in Rails? Which library/method if any will allow me to do this?
A:
A good starting point would be Net::HTTP library: http://stdlib.rubyonrails.org/libdoc/net/http/rdoc/index.html
Zepplock
2010-08-27 04:59:16
A:
Try net/http package, in particular post method. There're examples too.
As to xml part, you can send any data you want as long as it's string.
Nikita Rybak
2010-08-27 04:59:36
so I can just pass the xml string to the second argument?
denniss
2010-08-27 05:00:20
@denniss Never used post method myself, but according to the docs - yes. Anyway, it doesn't hurt to try :)
Nikita Rybak
2010-08-27 05:12:06