Fixed the issue with post method overwriting CURLOPT_HTTPHEADER