<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Class: RFuzz::Notifier</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Class</strong></td> <td class="class-name-in-header">RFuzz::Notifier</td> </tr> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../../files/lib/rfuzz/client_rb.html"> lib/rfuzz/client.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> Object </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> This simple class can be registered with an <a href="HttpClient.html">HttpClient</a> and it’ll get called when different parts of the HTTP request happen. Each function represents a different event, and the state parameter is a symbol of consisting of: </p> <pre> :begins -- event begins. :error -- event caused exception. :ends -- event finished (not called if error). </pre> <p> These calls are made synchronously so you can throttle the client by sleeping inside them and can track timing data. </p> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000064">close</a> <a href="#M000059">connect</a> <a href="#M000063">read_body</a> <a href="#M000065">read_chunk</a> <a href="#M000062">read_header</a> <a href="#M000061">redirect</a> <a href="#M000060">send_request</a> </div> </div> </div> <!-- if includes --> <div id="section"> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Instance methods</h3> <div id="method-M000064" class="method-detail"> <a name="M000064"></a> <div class="method-heading"> <a href="Notifier.src/M000064.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000064.html');return false;"> <span class="method-name">close</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Before and after the client closes with the server. </p> </div> </div> <div id="method-M000059" class="method-detail"> <a name="M000059"></a> <div class="method-heading"> <a href="Notifier.src/M000059.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000059.html');return false;"> <span class="method-name">connect</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Fired right before connecting and right after the connection. </p> </div> </div> <div id="method-M000063" class="method-detail"> <a name="M000063"></a> <div class="method-heading"> <a href="Notifier.src/M000063.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000063.html');return false;"> <span class="method-name">read_body</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Before and after the body is ready. </p> </div> </div> <div id="method-M000065" class="method-detail"> <a name="M000065"></a> <div class="method-heading"> <a href="Notifier.src/M000065.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000065.html');return false;"> <span class="method-name">read_chunk</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Called when a chunk from a chunked encoding is read. </p> </div> </div> <div id="method-M000062" class="method-detail"> <a name="M000062"></a> <div class="method-heading"> <a href="Notifier.src/M000062.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000062.html');return false;"> <span class="method-name">read_header</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Before and after the header is finally read. </p> </div> </div> <div id="method-M000061" class="method-detail"> <a name="M000061"></a> <div class="method-heading"> <a href="Notifier.src/M000061.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000061.html');return false;"> <span class="method-name">redirect</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Called whenever a <a href="HttpClient.html#M000029">HttpClient.redirect</a> is done and there are redirects to follow. You can use a notifier to detect that you’re doing to many and throw an abort. </p> </div> </div> <div id="method-M000060" class="method-detail"> <a name="M000060"></a> <div class="method-heading"> <a href="Notifier.src/M000060.html" target="Code" class="method-signature" onclick="popupCode('Notifier.src/M000060.html');return false;"> <span class="method-name">send_request</span><span class="method-args">(state)</span> </a> </div> <div class="method-description"> <p> Before and after the full request is actually sent. This may become "send_header" and "send_body", but right now the whole blob is shot out in one chunk for efficiency. </p> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>