1

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 Answer 1

0

According to this mailing list comment as of January, may not be possible:

https://groups.google.com/forum/#!searchin/httparty-gem/cookie/httparty-gem/H2me9zB1mEI/RNy3pdSzWnsJ

I personally started a project with HTTParty, and moved to RestClient because the behavior seems was more straightforward IMHO. Checkout the 'cookies' section of:

https://github.com/archiloque/rest-client

...may suite your needs.

Justin

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.