Login to a RESTful Rails app with HTTParty
问题 I have a web app with a clean RESTful JSON API, based on Rails 3.2 , Ruby 1.9 and Devise 2 . I would like to write a small script based on HTTParty web client in order to perform some actions frequently (with a crontab). But how can we sign in and keep the session open (with the session id passed by HTTP HEADER, and maybe stored in a cookie). I really have no experience about this aspect. 回答1: According to this mailing list comment as of January, may not be possible: https://groups.google.com