App-Foca
view release on metacpan or search on metacpan
lib/App/Foca/Client.pm view on Meta::CPAN
open(my $response_headers_fh, ">", \$response_headers);
my @headers = ();
push(@headers, 'Foca-Cmd-Params:' . $foca_args) if $foca_args;
my $curl = new WWW::Curl::Easy;
$curl->setopt(CURLOPT_VERBOSE, $self->{'debug'});
$curl->setopt(CURLOPT_HEADER, 0);
$curl->setopt(CURLOPT_URL, $url);
$curl->setopt(CURLOPT_WRITEDATA, $response_body_fh);
$curl->setopt(CURLOPT_WRITEHEADER, $response_headers_fh);
$curl->setopt(CURLOPT_TIMEOUT, $self->{'timeout'});
$curl->setopt(CURLOPT_CONNECTTIMEOUT, $self->{'connect_timeout'});
$curl->setopt(CURLOPT_HTTPHEADER, \@headers);
log_debug("$host - Requesting $url");
my $retcode = $curl->perform;
my $data = {};
if ($retcode == 0) {
my $full_response = $response_headers;
( run in 0.290 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )