diff options
Diffstat (limited to 'docs/examples/ftpgetresp.c')
-rw-r--r-- | docs/examples/ftpgetresp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c index 29290a31d..db96a3a13 100644 --- a/docs/examples/ftpgetresp.c +++ b/docs/examples/ftpgetresp.c @@ -60,6 +60,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile); 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); |