simple.c 652 B

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