Sha256: 4863826d24eb74c2fd868b843b25fbab4be585db12a600f79acfe6f24c3d8307
Contents?: true
Size: 1.87 KB
Versions: 2
Compression:
Stored size: 1.87 KB
Contents
<p> This is a tutorial for capturing http requests for modification and/or resubmission at a later date. First, get the environment right: </p> <ul> <li>Be sure you're viewing this in <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li> <li>Install <a href="http://labs.mozilla.com/2008/08/introducing-ubiquity/">Ubiquity</a></li> <li>Subscribe to the redirect-http command on this page</li> </ul> <p> Now capture the request from this page (use the same procedure wherever else you need to capture the parameters of a form): </p> <ul> <li>Bring up Ubiquity in Firefox by pressing 'option+space'</li> <li>Enter the command: redirect_http</li> </ul> <p> You should now see some notification that you're redirecting this page. Write what you want to say, hit submit, and you'll be asked to save a configuration file for the request. Save it, then on the command line execute this: </p> <pre><code> % tap run -- load/yaml --:s submit --: dump < request.yml</code></pre> <p> The request will be submitted and you'll get a printout of the response body. To prove everything worked right, click the close link in the redirection bar and resubmit the form. </p> <a href="/capture/say?words=link+was+clicked">Link</a> <form action='/capture/say'> Form: <input name='words' value="form was submitted"/> <input type="submit" value="submit" /> </form> <p> Redirection occurs via the on-click and on-submit callbacks for links and forms, respectively. The existing behavior is preserved, as can be demonstrated below: </p> <pre> <form action='/capture/say' onsubmit='alert("Form was submitted!")'> </pre> <a href="/capture/say?words=link+was+clicked" onclick='alert("Link was clicked!")'>Link with OnClick</a> <form action='/capture/say' onsubmit='alert("Form was submitted!")'> Form with OnSubmit: <input name='words' value="form was submitted"/> <input type="submit" value="submit" /> </form>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tap-mechanize-0.5.1 | views/tap/mechanize/capture/tutorial.erb |
tap-mechanize-0.5.0 | views/tap/mechanize/capture/tutorial.erb |