Using CURLOPT_POSTFIELDS (3) implies setting CURLOPT_POST (3) to 1. If CURLOPT_POSTFIELDS (3) is explicitly set to NULL then libcurl gets the POST data from the read callback. To send a zero-length (empty) POST, set CURLOPT_POSTFIELDS (3) to an empty string, or set CURLOPT_POST (3) to 1 and CURLOPT_POSTFIELDSIZE (3) to 0.