![]() |
Why cannot CURLRequest::sendRequest() include remote status in Exception thrown - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Why cannot CURLRequest::sendRequest() include remote status in Exception thrown (/showthread.php?tid=82319) |
Why cannot CURLRequest::sendRequest() include remote status in Exception thrown - tgix - 06-30-2022 Before I go ahead and write my own implementation of a cURL request I'd like to understand why the exception thrown doesn't contain details about the http status (fromĀ curl_getinfo($ch, CURLINFO_HTTP_CODE)) but only the cURL error message (in this case 22 indicating an http status >= 400)? I'd like to see if it's 400, 401 or 404 causing the request to fail. RE: Why cannot CURLRequest::sendRequest() include remote status in Exception thrown - iRedds - 06-30-2022 composer require guzzlehttp/guzzle what is the point of writing your own if there is a ready-made popular solution? RE: Why cannot CURLRequest::sendRequest() include remote status in Exception thrown - tgix - 06-30-2022 (06-30-2022, 07:51 AM)iRedds Wrote: composer require guzzlehttp/guzzle Third-party-library-composer-weariness I guess ;-) |