开发者

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

开发者 https://www.devze.com 2023-03-05 06:50 出处:网络
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?

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

精彩评论

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