Skip to content

Commit

Permalink
Added curl_global_* functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
gknauf committed Jul 12, 2012
1 parent a39789c commit df5a47b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/examples/post-callback.c
Expand Up @@ -60,6 +60,10 @@ int main(void)
pooh.readptr = data;
pooh.sizeleft = strlen(data);

/* In windows, this will init the winsock stuff */
curl_global_init(CURL_GLOBAL_DEFAULT);

/* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
Expand Down Expand Up @@ -128,5 +132,6 @@ int main(void)
/* always cleanup */
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}

0 comments on commit df5a47b

Please sign in to comment.