Closed stevepatter closed 7 years ago
I've added HTTP status check functions that I've found useful, and may make it simpler to script around the curl library.
Now, a user can run
$curl = new Curl(); $curl->get('http://www.github.com/'); if ($curl->isSuccess()) { // handle curl response } else { throw new Exception('failed to fetch content'); }
rather than having to check for specific http status codes. Of course, they still have access to the full status code should that be required.
I've adjusted the code for PSR-2 standards & it now passes PHP5 tests on Travis. Looks like the PHP7 & HHVM setup might be misconfigured.
Thank you
I've added HTTP status check functions that I've found useful, and may make it simpler to script around the curl library.
Now, a user can run
rather than having to check for specific http status codes. Of course, they still have access to the full status code should that be required.