We are working on 3CX integration and we have found API didn't work properly when 'Content-Type: application/json; charset=utf-8' header is passed in requests.
It just returns 400 error - Bad Request.
The reason of that is the content type is strictly hardcoded in 94 line of `application/Espo/Core/ControllerManager.php`.
As a quick workaround we had to patch the file as follows:
Could you fix it in upcoming 6.1 and 7.0 releases?
Another thread related to this issue is
https://forum.espocrm.com/forum/deve...ost-to-account
Related thread on 3CX forum:
It just returns 400 error - Bad Request.
The reason of that is the content type is strictly hardcoded in 94 line of `application/Espo/Core/ControllerManager.php`.
PHP Code:
if ($data && $request->getContentType() === 'application/json') {
$data = json_decode($data);
}
PHP Code:
if ($data && stripos($request->getContentType() ,'application/json') !== false) {
$data = json_decode($data);
}
Another thread related to this issue is
https://forum.espocrm.com/forum/deve...ost-to-account
Related thread on 3CX forum:
Comment