note 102264 deleted from function.curl-setopt by cmb

From: Date: Sun, 24 Nov 2019 08:36:06 +0000
Subject: note 102264 deleted from function.curl-setopt by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213187@lists.php.net to get a copy of this message
Note Submitter: anon@mouse dot com ---- If your POST data seems to be disappearing (POST data empty, request is being handled by the server as a GET), try rearranging the order of CURLOPT_POSTFIELDS setting with CURLOPT_NOBODY. CURLOPT_POSTFIELDS has to come AFTER CURLOPT_NOBODY setting because if it comes after it wipes out the Content-Type header that tells your URL target that the request is a POST not a GET. Not sure if this is expected behavior but it certainly isn't documented (except on Stackoverflow.com, which is supremely unhelpful - BTW, guys over on stack overflow... once you've figured out a PHP problem, posting the solution here would save everyone extra search time).

« previous php.notes (#213187) next »