Class RFuzz::Notifier
In: lib/rfuzz/client.rb
Parent: Object

This simple class can be registered with an HttpClient 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:

 :begins -- event begins.
 :error -- event caused exception.
 :ends -- event finished (not called if error).

These calls are made synchronously so you can throttle the client by sleeping inside them and can track timing data.


Public Instance methods

Before and after the client closes with the server.

Fired right before connecting and right after the connection.

Before and after the body is ready.

Called when a chunk from a chunked encoding is read.

Before and after the header is finally read.

Called whenever a HttpClient.redirect 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.

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.