Maybe Arogs are getting wise to you :P From the FAQ: What does "Inactivity timeout" mean? What does "Premature connection close" mean?, the Mojo::UserAgent has an example or response handling:
use Mojo::UserAgent; # Fine grained response handling (dies on connection errors) my $ua = Mojo::UserAgent->new; my $res = $ua->get('mojolicious.org/perldoc')->result; if ($res->is_success) { say $res->body } elsif ($res->is_error) { say $res->message } elsif ($res->code == 301) { say $res->headers->location } else { say 'Whatever...' }
In reply to Re: Reacting to Mojo::UserAgent Errors
by marto
in thread Reacting to Mojo::UserAgent Errors
by AlwaysSurprised
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |