我遇到了这个: https://github.com/archiloque/rest-client ...而且它看起来相当简单直接。但是,使用第三方 API 对我来说是新的,所以我不确定库中的什么最重要,最重要的是,哪个最容易使用。
rest-client
与标准 Net::Http 相比有什么优势吗? ?
我还找到了https://github.com/jnunemaker/httparty ,尽管它似乎不像 rest-client 那样有据可查,甚至这个:https://github.com/dbalatero/typhoeus .它们比包含的标准更好吗?
有什么想法、建议吗?
最佳答案
您可能会发现这篇来自 RestClient 初始作者 Adam Wiggins 的短文很有用: http://adam.heroku.com/past/2008/8/8/ruby_libs_for_making_web/
我个人在我的项目中使用 httparty - 这是以前开发人员的选择,但对我来说效果很好。
关于ruby - Net :Http and third-party library for making API calls in Rails/Ruby?有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6279567/