$proxy->push_filter( request => HTTP::Proxy::BodyFilter::simple->new( sub { my ( $self, $dataref, $message, $protocol, $buffer ) = @_; print "[".time_stamp()."][out ". length($message->as_string() || ''). "] ".$message->uri()."\n"; } ) ); $proxy->push_filter( response => HTTP::Proxy::BodyFilter::simple->new( sub { my ( $self, $dataref, $message, $protocol, $buffer ) = @_; if( $$dataref ){ print "[".time_stamp()."][in ". length($$dataref)."]\n"; } } ) );