denniss
denniss

Reputation: 17589

Sending XML over HTTP with Rails

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?

Upvotes: 1

Views: 2062

Answers (2)

Nikita Rybak
Nikita Rybak

Reputation: 67986

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.

Upvotes: 1

Zepplock
Zepplock

Reputation: 29135

A good starting point would be Net::HTTP library: http://stdlib.rubyonrails.org/libdoc/net/http/rdoc/index.html

Upvotes: 0

Related Questions