module HTTPX::Plugins::Cookies

  1. lib/httpx/plugins/cookies.rb

This plugin implements a persistent cookie jar for the duration of a session.

It also adds a #cookies helper, so that you can pre-fill the cookies of a session.

gitlab.com/honeyryderchuck/httpx/wikis/Cookies

Methods

Public Class

  1. extra_options
  2. load_dependencies

Public Class methods

extra_options (options)
[show source]
   # File lib/httpx/plugins/cookies.rb
17 def self.extra_options(options)
18   Class.new(options.class) do
19     def_option(:cookies) do |cookies|
20       return cookies if cookies.is_a?(Store)
21 
22       Store.new(cookies)
23     end
24   end.new(options)
25 end
load_dependencies (*)
[show source]
   # File lib/httpx/plugins/cookies.rb
64 def self.load_dependencies(*)
65   require "http/cookie"
66 end