now $opts[CURLOPT_POST] = TRUE; seems work, so used instead of CUSTOMREQUEST

Due to a stupid bug, using curl_setopt_array(), cURL doesn't override the Content-Type header field. So we must set the header using, instead, curl_stopt(). Fixed.