aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/post-callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/post-callback.c')
-rw-r--r--docs/examples/post-callback.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index adadaf803..9736d8854 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -120,6 +120,10 @@ int main(void)
/* 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);