Added error checking for samples.

This commit is contained in:
Guenter Knauf
2012-07-04 17:03:52 +02:00
parent 6388ac7dc1
commit a3dbbcfd2a
19 changed files with 106 additions and 5 deletions

View File

@@ -132,6 +132,10 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
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);