Include curl error code constant in curl error message (Curl::curlErrorMessage)

Before:
    Timeout was reached: Operation timed out after 30001 milliseconds with 1453867 out of 3000000 bytes received

After:
    Timeout was reached (CURLE_OPERATION_TIMEOUTED): Operation timed out after 30001 milliseconds with 1453867 out of 3000000 bytes received
This commit is contained in:
Zach Borboa
2022-09-30 07:31:06 -07:00
parent 9195bcde44
commit acf8e9f6a0
25 changed files with 69 additions and 28 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ $curl->patch('https://httpbin.org/patch', [
]);
if ($curl->error) {
echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage . "\n";
echo 'Error: ' . $curl->errorMessage . "\n";
} else {
echo 'Response:' . "\n";
var_dump($curl->response);