use Mojo::UserAgent;
# Fetch the latest Mojolicious tarball
my $ua = Mojo::UserAgent->new(max_redirects => 5);
my $tx = $ua->get('https://www.github.com/kraih/mojo/tarball/master');
$tx->res->content->asset->move_to('mojo.tar.gz');
https://www.github.com/kraih/mojo/tarball/master -p mojo.tar.gz' on mac, it can download the mojo tarball.
I don't know why the code snippet above doesn't work for the mojo tarball.
Thanks,
Peng
$ENV{MOJO_MAX_MESSAGE_SIZE} = 1073741824;
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
but when I test the example on the website, I test this example
http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Large-file-downloadsuse Mojo::UserAgent; # Fetch the latest Mojolicious tarball my $ua = Mojo::UserAgent->new(max_redirects => 5); my $tx = $ua->get('https://www.github.com/kraih/mojo/tarball/master'); $tx->res->content->asset->move_to('mojo.tar.gz');
this code doesn't work for me, it indeed generate a new file mojo.tar.gz, but the size is 0B.
cpan IO::Socket::SSL ,
Now the code can works for me. Thanks for your help.
Thanks,
Peng
--
You received this message because you are subscribed to a topic in the Google Groups "Mojolicious" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mojolicious/KE7a6-4kyRg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mojolicious...@googlegroups.com.