1

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?

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

so I can just pass the xml string to the second argument?
@denniss Never used post method myself, but according to the docs - yes. Anyway, it doesn't hurt to try :)
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.