class Arachnid::SessionCache

Overview

Stores active HTTP Sessions organized by scheme, host-name and port.

Defined in:

arachnid/session_cache.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(read_timeout : Int32? = nil, connect_timeout : Int32? = nil, max_redirects : Int32? = nil, do_not_track : Bool? = nil) #

Create a new session cache


[View source]

Instance Method Detail

def [](url) #

Provides an active session for a given URL.


[View source]
def active?(url) #

Determines if there is an active session for the given URL


[View source]
def clear #

Clears the session cache


[View source]
def connect_timeout : Int32 #

Optional connect timeout.


[View source]
def connect_timeout=(connect_timeout : Int32) #

Optional connect timeout.


[View source]
def do_not_track=(do_not_track : Bool) #

Should we set a DNT (Do Not Track) header?


[View source]
def do_not_track? : Bool #

Should we set a DNT (Do Not Track) header?


[View source]
def kill!(url) #

Destroys an HTTP session for the given scheme, host, and port.


[View source]
def max_redirects : Int32? #

Max redirects to follow.


[View source]
def max_redirects=(max_redirects : Int32?) #

Max redirects to follow.


[View source]
def read_timeout : Int32 #

Optional read timeout.


[View source]
def read_timeout=(read_timeout : Int32) #

Optional read timeout.


[View source]