WWW-Curl-UserAgent
view release on metacpan or search on metacpan
lib/WWW/Curl/UserAgent/Request.pm view on Meta::CPAN
my $self = shift;
my $easy = WWW::Curl::Easy->new;
my $request = $self->http_request;
$easy->setopt( CURLOPT_CONNECTTIMEOUT_MS, $self->connect_timeout );
$easy->setopt( CURLOPT_HEADER, 0 );
$easy->setopt( CURLOPT_NOPROGRESS, 1 );
$easy->setopt( CURLOPT_TIMEOUT_MS, $self->timeout );
$easy->setopt( CURLOPT_URL, $request->uri );
$easy->setopt( CURLOPT_WRITEHEADER, $self->header_ref );
$easy->setopt( CURLOPT_WRITEDATA, $self->content_ref );
$easy->setopt( CURLOPT_FORBID_REUSE, !$self->keep_alive );
$easy->setopt( CURLOPT_FOLLOWLOCATION, $self->followlocation );
$easy->setopt( CURLOPT_MAXREDIRS, $self->max_redirects );
# see https://github.com/pauldix/typhoeus/blob/master/lib/typhoeus/easy.rb#L197
if ( $request->method eq 'GET' ) {
$easy->setopt( CURLOPT_HTTPGET, 1 );
}
elsif ( $request->method eq 'POST' ) {
( run in 0.308 second using v1.01-cache-2.11-cpan-55f5a4728d2 )