views:

25

answers:

2

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
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
so I can just pass the xml string to the second argument?
denniss
@denniss Never used post method myself, but according to the docs - yes. Anyway, it doesn't hurt to try :)
Nikita Rybak