开发者

Consume Rails web service through a Rails application

There seem to be a few alternatives for Rails web services. Namely ActiveResource, HTTParty a开发者_如何学JAVAnd Nokogiri

Is there a clear winner between these 3 (or others) for getting the job done? The requirements are basic i.e. do a POST without requiring any authentication.

I should mention that I am referring to Rails 3 applications, both at the consumer and the server ends. I know it is a rather general question and that there are plenty of posts out there but there does not seem to be a clear trend as to which one serves simple needs best (gut feeling says go for ActiveResource since it is part of the framework).


If it's a RESTful api (which modern rails app's apis should be), ActiveResource will be by far the simplest to use and will require very little configuration to get running, plus, because it makes the api behave as if it's just another model, it keeps your app's code cleaner and simpler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜