Class: Tap::Mechanize::Submit
- Defined in:
- lib/tap/mechanize/submit.rb
Overview
:startdoc::task submits a captured http request
Performs a series of HTTP requests and returns the content of the final page. Requests must be hashes that at least specify the uri of the next request, but more typically also specify the request method, parameters, and even headers.
All requests are peformed in the same session, so logins and subsequent actions are allowed. The easiest way to capture HTTP requests is to use the capture server distributed with tap-mechanize. Simply start a tap server and work through the tutorial (localhost:8080/capture/tutorial).
% tap server
Once you have a request file:
% tap run -- load/yaml --:s submit --: dump < request.yml
Remember, only the results of the final page are returned!
Instance Method Summary collapse
Methods inherited from Request
Instance Method Details
#process(*requests) ⇒ Object
25 26 27 |
# File 'lib/tap/mechanize/submit.rb', line 25 def process(*requests) super(requests).content end |