diff options
Diffstat (limited to 'docs/examples/pop3s.c')
-rw-r--r-- | docs/examples/pop3s.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/examples/pop3s.c b/docs/examples/pop3s.c index 4a2e8fdeb..44d7c80d0 100644 --- a/docs/examples/pop3s.c +++ b/docs/examples/pop3s.c @@ -59,7 +59,12 @@ int main(void) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); #endif + /* 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)); /* always cleanup */ curl_easy_cleanup(curl); |