aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/http-post.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/http-post.c')
-rw-r--r--docs/examples/http-post.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c
index 22de628ca..80f2b343b 100644
--- a/docs/examples/http-post.c
+++ b/docs/examples/http-post.c
@@ -38,6 +38,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);