I create an object $txas:
my $tx = $self->ua->build_tx( $method, ... );
Then request:
my $res = $self->ua->start( $tx )->res;
I got the correct answer, but when I want to repeat the request, I get an error:
my $repeat = $self->ua->start( $tx )->res;
Can't call method "stream" on an undefined value at /local/lib/perl5/Mojo/UserAgent.pm line 155.
Why can't I repeat the request?
source
share