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       if cookies.is_a?(Store)
21         cookies
22       else
23         Store.new(cookies)
24       end
25     end
26   end.new(options)
27 end
load_dependencies (*)
[show source]
   # File lib/httpx/plugins/cookies.rb
72 def self.load_dependencies(*)
73   require "http/cookie"
74 end