Environment:
PHP: 7.4.9 — CodeIgniter: 4.0.4
Any ideas on this problem:
When I consume an API using the CURLRequest
PHP Code:
$curlClient = \Config\Services::curlrequest();
$response = $curlClient->request( 'POST', $thePath, ['body' => "username=THEUSER&password=THEPASSWORD", 'http_errors' => FALSE] );
I get a 403 error, however when I execute
PHP Code:
$response = shell_exec( 'curl -d "username=THEUSER&password=THEPASSWORD" -X POST ' . $thePath );
the api return 200 and the actual data.
A bit more context, the api call is to get a JWT from a Wordpress authorisation plugin.