diff options
Diffstat (limited to 'docs/libcurl/curl_easy_strerror.3')
-rw-r--r-- | docs/libcurl/curl_easy_strerror.3 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3 index 168cd131f..7b610441c 100644 --- a/docs/libcurl/curl_easy_strerror.3 +++ b/docs/libcurl/curl_easy_strerror.3 @@ -32,6 +32,15 @@ CURLcode error code passed in the argument \fIerrornum\fP. Typically applications also appreciate \fICURLOPT_ERRORBUFFER(3)\fP for more specific error descriptions generated at run-time. +.SH EXAMPLE +.nf + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); +.fi .SH AVAILABILITY This function was added in libcurl 7.12.0 .SH RETURN VALUE |