miyagawa / faraday-cookie_jar

Client-side cookie management for Faraday
MIT License
76 stars 12 forks source link

Add the ability to configure loading and saving cookie jar to a file. #15

Open rhysawilliams2010 opened 3 years ago

rhysawilliams2010 commented 3 years ago

I wanted the ability to configure faraday-cookie_jar (by another gem) to be able to load and save cookie data to a file. I.e.

# ./config/initializers/faraday-cookie_jar.rb
Faraday::CookieJar.configure do |config|
  config.filename = "#{Rails.root}/tmp/cookies.yml"
  config.save_options = { session: true }
end