Answer the question
In order to leave comments, you need to log in
Why does a POST request give an error?
Hello!
Trying to send request from Laravel application controller using GuzzleHttp client like this
$client = new Client();
$res = $client->post('http://auth.dev/oauth/token', [
'form_params' => [
'grant_type' => $this->grant_type,
'client_secret' => $this->client_secret,
'client_id' => $this->client_id,
'username' => $data['login'],
'password' => $data['password'],
]
]);
Server error: `POST http://auth.dev/oauth/token` resulted in a `500 Internal Server Error` response:\n
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'gate.oauth_clients' doesn't exist (SQL: select * from `oau (truncated...)\n
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "...",
"refresh_token":"..."
}
Answer the question
In order to leave comments, you need to log in
Decided! Port problem. If the services are on different servers, everything works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question