diff options
Diffstat (limited to 'docs/examples/simplessl.c')
-rw-r--r-- | docs/examples/simplessl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index 46a378329..b77c276e4 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -118,7 +118,13 @@ int main(void) /* disconnect if we can't validate server's cert */ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1L); + /* 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)); + break; /* we are done... */ } /* always cleanup */ |