1
/*****************************************************************************
3
* Project ___| | | | _ \| |
5
* | (__| |_| | _ <| |___
6
* \___|\___/|_| \_\_____|
8
* $Id: persistant.c,v 1.1 2003/01/07 02:17:48 andy Exp $
13
#include "curl/curl.h"
15
/* to make this work under windows, use the win32-functions from the
16
docs/examples/win32socket.c file as well */
18
/* This example REQUIRES libcurl 7.7 or later */
19
#if (LIBCURL_VERSION_NUM < 0x070700)
20
#error Too old libcurl version, upgrade or stay away.
23
int main(int argc, char **argv)
29
/* this sends all memory debug messages to a specified logfile */
30
curl_memdebug("memdump");
33
curl_global_init(CURL_GLOBAL_DEFAULT);
34
curl = curl_easy_init();
36
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
37
curl_easy_setopt(curl, CURLOPT_HEADER, 1);
39
/* get the first document */
40
curl_easy_setopt(curl, CURLOPT_URL, "http://www.cmake.org/");
41
res = curl_easy_perform(curl);
43
/* get another document from the same server using the same
45
curl_easy_setopt(curl, CURLOPT_URL, "http://www.cmake.org/HTML/Index.html");
46
res = curl_easy_perform(curl);
49
curl_easy_cleanup(curl);