aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/http-post.c
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2012-07-12 02:02:22 +0200
committerGuenter Knauf <lists@gknw.net>2012-07-12 02:02:57 +0200
commitbe795f90dac26c240ab64e1e1e156a66fa21db89 (patch)
treee926ee4fd87494fc0273d9a64e6fbee86a4a4d83 /docs/examples/http-post.c
parent1c4663bc42985fd8fbd959bd9516d5ef77dae612 (diff)
Added curl_global_* functions.
Diffstat (limited to 'docs/examples/http-post.c')
-rw-r--r--docs/examples/http-post.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c
index 80f2b343b..f1975b1ec 100644
--- a/docs/examples/http-post.c
+++ b/docs/examples/http-post.c
@@ -27,6 +27,10 @@ int main(void)
CURL *curl;
CURLcode res;
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
@@ -46,5 +50,6 @@ int main(void)
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}