'invoke-after-get' => sub { my($robot, $hook, $url, $response) = @_; if (DEBUG) { print "ORIG_URL: $url\n"; print "URL: "; for($response->header_field_names) { print "$_\n"; } print "\n"; print "RESPONSE: ". $response->code ."\n"; print "\n"; } #### C:\Documents and Settings\gecko\Desktop>nc localhost 80 GET /cgi-bin/redirect.pl HTTP/1.1 host:localhost HTTP/1.1 302 Moved Date: Sun, 17 Jun 2007 02:34:36 GMT Server: Apache/2.2.4 (Win32) Location: http://www.google.com Content-Length: 0 Content-Type: text/plain #### ORIG_URL: http://127.0.0.1/cgi-bin/redirect.pl URL: Cache-Control Date Server Content-Type Client-Date Client-Peer Client-Response-Num Client-Transfer-Encoding Set-Cookie Title RESPONSE: 200 URL: http://www.google.com/ ORIG_URL: http://127.0.0.1/cgi-bin/redirect.pl RESPONSE: 200 SIZE: 5799 TITLE: Google #### invoke-after-get This hook function is invoked immediately after the robot makes each GET request. This means your hook function will see every type of response, not just successful GETs.