in reply to Cannot suppress Curl headers
Unforunately it doesn't seem you can use undef for these options.my $response_data; my $response_header; open(my $RD, ">", \$response_data); open(my $RH, ">", \$response_header); ... $curl->setopt(CURLOPT_WRITEDATA, $RD); $curl->setopt(CURLOPT_HEADERDATA, $RH); ... $curl->perform; print "Response header: $response_header\n"; print "Response body: $response_body\n";
Some more testing indicates that CURLOPT_HEADER option determines whether or not the headers are copied through the CURLTOP_WRITEDATA handle as well as through the CURLOPT_HEADERDATA handle.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cannot suppress Curl headers
by RSI_Don (Initiate) on May 29, 2008 at 19:20 UTC | |
by pc88mxer (Vicar) on May 29, 2008 at 20:13 UTC | |
by RSI_Don (Initiate) on May 29, 2008 at 20:45 UTC |