According to cURL module documentation for CURLOPT_POSTFIELDS option:
This parameter can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data.
Because of curl version, I think. Same problem and no answer.
And passing post data as array, requires headers.
But they are disabled curl_setopt($ch, CURLOPT_HEADER, 0);
According to cURL module documentation for
CURLOPT_POSTFIELDS
option:So, why should we encode data manually?