RE: POST with HEAD?
"Liu Shan Shui" <[email protected]>
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <001401ca172a$b84511c0$28cf3540$@sg> |
Hi Stephen, Thanks! Seems "unnatural", but it works great! Note to others who are reading this thread: You still have to set CURL_NOBODY first before CURLOPT_CUSTOMREQUEST. With regards, Liu Shan Shui [email protected] "Life would be much easier if I had the source code." - Anonymous From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Pynenburg Sent: Friday, August 07, 2009 2:22 PM To: curl with PHP Subject: Re: POST with HEAD? Hi there, I encountered this behaviour a while ago - not sure why, but it seems you're correct in saying that CURLOPT_POST and _NOBODY don't go together well. The solution that worked for me was very simple: just use curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST") instead of setting CURLOPT_POST. -Stephen On Thu, Aug 6, 2009 at 22:35, Liu Shan Shui <[email protected]> wrote: Dear cURL users, Is it possible to combine POST with HEAD (sending a HTTP POST request and expecting only headers in HTTP response)? I've tested with the options, CURLOPT_NOBODY and CURLOPT_POST, switched around the order of setting them, but they seem to be mutually exclusive. If not, is there any alternative way where I can send a GET/POST request and have cURL to not wait and simply ignore the entire response? With regards, Liu Shan Shui [email protected] "Life would be much easier if I had the source code." - Anonymous _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php