simple.c 712 B

12345678910111213141516171819202122232425262728
  1. /*****************************************************************************
  2. * _ _ ____ _
  3. * Project ___| | | | _ \| |
  4. * / __| | | | |_) | |
  5. * | (__| |_| | _ <| |___
  6. * \___|\___/|_| \_\_____|
  7. *
  8. * $Id$
  9. */
  10. #include "curl/curl.h"
  11. int main(void)
  12. {
  13. CURL *curl;
  14. CURLcode res;
  15. curl_global_init(CURL_GLOBAL_DEFAULT);
  16. curl = curl_easy_init();
  17. if(curl) {
  18. curl_easy_setopt(curl, CURLOPT_URL, "http://www.cmake.org/HTML/Index.html");
  19. res = curl_easy_perform(curl);
  20. /* always cleanup */
  21. curl_easy_cleanup(curl);
  22. }
  23. return 0;
  24. }