Level 51
Can you show the code where you instantiate $http?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to make a a login method that returns a password grant token to the user to use with an iPhone app. I am using Guzzle like this
$response = $http->post('http://www.srty.test/oauth/token', [
'form_params' => [
'grant_type' => 'password',
'client_id' => env('PASSWORD_GRANT_CLIENT'),
'client_secret' => env('PASSWORD_GRANT_SECRET'),
'username' => request('email'),
'password' => request('password'),
'scope' => '',
],
]);
calling it I get this error cURL error 6: Could not resolve host but the URL is a valid url
Please or to participate in this conversation.