消费REST API的Rails [英] Consuming REST API Rails

查看:175
本文介绍了消费REST API的Rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了这个的问题,但它很老了,感觉现在有其他办法,以战神。

I've looked at this question but it's quite old and I feel there's now other alternatives to ARes.

,我看着阿比·史密斯 ,的狮吼当然战神和。

Given that many people seem to think that ActiveResource is kind of outdated and heavyweight, I've looked at Api Smith, Her, Roar and of course ARes.

哪些宝石之一将是最可靠,面向未来的选择?

Which one of these gems would be the most reliable, and future proof alternative?

推荐答案

为什么不使用类似HTTParty或法拉第底层库的?它们将涵盖了很多丑陋的东西给你(SSL,解析/序列化jsons和XML的,日志,添加标题......),你会保持URL的完全控制和数据管理。

Why not using lower level libraries like HTTParty or Faraday ? They will cover a lot of the ugly stuff for you (ssl, parsing/serializing jsons and XMLs, logging, adding headers...) and you'll keep complete control of the URLs and the management of data.

这篇关于消费REST API的Rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆