I\'am working on a REST API. Therefore I prepared a function which sends the authentication data via curl to the REST Server. I\'ve implemented two authentication options. T
After lots of hours I found the problem and the solution for this problem.
The problem is:
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization));
Using 'Content-Type: application/json' results in loosing the POST data information.
Solution for this is:
change
'Content-Type: application/json'
to
'Content-Type: application/x-www-form-urlencoded'