Communicating with remote apis including rails

I am fairly new to rails. In my project I have to do a number of api calls(POST) to many servers. Each call requires a number of arguments which needs to be send via POST request. The response will be simple with just json data. Can anyone suggest be some better way to do this or someone has an experience with this kind of stuff. Most of these operation will be just single round strip.

I have read Active Resource and net::HTTP and I am confused which one to use. Since Active Resource is just for RESTful api so I don't know before hand if the server I will be communicating to will be providing the same.

Thanks in advance!

Answers


You must check if the API is working with REST or SOAP.

If it is a REST you could use rest-client gem

If it uses SOAP you can use savon gem


Need Your Help

order and change one column of database

mysql sql

I have one col in my database named position used for ordering. However, when some records is deleted, the sequence get messed up. I want to reorder this col when the table is changed(maybe use tri...

error in compiling code that call to rest service

java rest packages

I trying to use this example and learn how to call to rest service,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.