Mechanize::HTTP::Agent
Inherits Reference / Object
This class handles web interation mechanize made.
Constructors
Instance methods
add_auth(uri : String, user : String, pass : String)
set basic auth credentials.
# set an auth credential with a specific url.
agent.add_auth("http://example.com", "username", "password")
auth_store
Sourceauthenticate_methods
Sourceauthenticate_parser
Sourcecontext
Sourcefetch(uri, method = :get, headers = ::HTTP::Headers.new, params = Hash(String, String).new, body : String | Nil = nil, referer = (if history.empty?
else
current_page
end))
send http request and return page. This method is called from Mechanize#get, #post and other methods. There's no need to call this method directly.
history
Sourcehistory=(history : History)
Sourcemax_history
Get maximum number of items allowed in the history. The default setting is 100 pages.
agent.max_history # => 100
max_history=(length)
Set maximum number of items allowed in the history.
agent.max_history = 1000
request_cookies
Sourcerequest_cookies=(request_cookies : ::HTTP::Cookies)
Sourcerequest_headers
Sourcerequest_headers=(request_headers : ::HTTP::Headers)
Sourceuser_agent
Sourceuser_agent=(user_agent : String)
Source