Method: Mechanize::HTTP::Agent#pre_connect
- Defined in:
- lib/mechanize/http/agent.rb
#pre_connect(request) ⇒ Object
Invokes hooks added to pre_connect_hooks before a request is made. Yields the agent and the request that will be performed to each hook.
428 429 430 431 432 |
# File 'lib/mechanize/http/agent.rb', line 428 def pre_connect request # :yields: agent, request @pre_connect_hooks.each do |hook| hook.call self, request end end |