![]() |
some API has set 400, 401 etc if have error in username or other param
in CI4 (v4.4.8) I cant get response for this. any idea?
Are you talking about CURLRequest?
See https://codeigniter.com/user_guide/libra...ttp-errors (06-06-2024, 08:55 PM)kenjis Wrote: Are you talking about CURLRequest? yes, its about it. but how to get response from API when its status code is 400, 401 I use try-catch, but in catch cant use like Guzzle PHP Code: try { PHP Code: $response = $client->request('GET', '/api-endpoint', ['http_errors' => false]); you may try add http_errors => false, like example above to get the response from API. |
Welcome Guest, Not a member yet? Register Sign In |