I need to access a REST JSon Service. It’s just connecting to an HTTPS using Basic authentication and performing some GETs and POSTs. This is a Ruby script running from a crontab.
These are the requirements:
- Ruby 1.8.7
- As light as possible (I’m not willing to install Rails).
Should I use HTTParty? I tried to install the gem and use it from irb with no luck. Apparently it has some dependencies.
Should I go for other library like net/http?
If HTTParty is the way to go, can you please include some instructions on how to get it to work in an IRB console?
Whenever I am connecting to a REST/JSON/API or just a site directly I go for HTTParty / Merhanize / Nokogiri depending on what exactly I need to do with the site. I also would be sure to check Ruby Toolbox in their HTTPClient category for other popular gems.