Module: HTTP

Defined in:
lib/http-session.rb,
lib/http/session/version.rb

Defined Under Namespace

Classes: Session

Class Method Summary collapse

Class Method Details

.session(default_options = {}) ⇒ Session

Returns a new instance of Session.

Parameters:

  • default_options (Hash) (defaults to: {})

Options Hash (default_options):

  • :cookies (Boolean, Hash)

    session cookies option

  • :cache (Boolean, Hash)

    session cache option

  • :persistent (Boolean, Hash)

    session persistent option

  • :http (Hash)

    http client options

Returns:

  • (Session)

    a new instance of Session.



11
12
13
# File 'lib/http-session.rb', line 11

def session(default_options = {})
  HTTP::Session.new(default_options)
end