RTFM?
Is there a manual that describes how to get to headers, or are you sugggesting I hack the Curl source?
At that point, I might as well use an alternate interface it seems.
| [reply] |
Is there a manual that describes how to get to headers, or are you sugggesting I hack the Curl source?
Wait, why did you pick curl?
This module provides a Perl interface to libcurl. It is not intended to be a standalone module and because of this, the main libcurl documentation should be consulted for API details at http://curl.haxx.se. The documentation you're reading right now only contains the Perl specific details, some sample code and the differences between the C API and the Perl one.
http://cpansearch.perl.org/src/ANDREMAR/WWW-Curl-Simple-0.100181/lib/WWW/Curl/Simple/Request.pm
my ($body_ref, $head_ref);
$self->body(\$body_ref);
$self->head(\$head_ref);
open (my $fileb, ">", \$body_ref);
$curl->setopt(CURLOPT_WRITEDATA,$fileb);
my $h = $self->head;
open (my $fileh, ">", \$head_ref);
$curl->setopt(CURLOPT_WRITEHEADER,$fileh);
return $curl;
sub response {
my ($self) = @_;
my $res = HTTP::Response->parse(${$self->head} . "\r" . ${$self->b
+ody});
$res->request($self->request);
$res->content(${$self->body});
return $res;
}
http://search.cpan.org/grep?cpanid=SZBALINT&release=WWW-Curl-4.14&string=CURLOPT_WRITEHEADER&i=1&n=1&C=12 | [reply] [d/l] |
At the time I picked curl as it had the simplest interface -- a 'get'.
No other reason.
| [reply] |