开发者

Rails 3: What's needed to integrate with a REST API?

What do I need to have in my app in order to do GET, PUT, etc requests to a public REST API that answers with JSON?

I'm a little confus开发者_运维百科ed with that.

Thanks!


ActiveResource was made for that. You can use the format= to make it parse JSON:

class User < ActiveResource::Base
      self.format = :json
      #...
end
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜