1. /********* Sample code generated by the curl command-line tool **********
    2. * All curl_easy_setopt() options are documented at:
    3. * https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
    4. ************************************************************************/
    5. #include <curl/curl.h>
    6. int main(int argc, char *argv[])
    7. {
    8. CURLcode ret;
    9. CURL *hnd;
    10. hnd = curl_easy_init();
    11. curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
    12. curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
    13. curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS, "/home/daniel/.ssh/known_hosts");
    14. curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
    15. /* Here is a list of options the curl code used that cannot get generated
    16. as source easily. You may select to either not use them or implement
    17. them yourself.
    18. CURLOPT_WRITEDATA set to a objectpointer
    19. CURLOPT_WRITEFUNCTION set to a functionpointer
    20. CURLOPT_READDATA set to a objectpointer
    21. CURLOPT_READFUNCTION set to a functionpointer
    22. CURLOPT_SEEKDATA set to a objectpointer
    23. CURLOPT_STDERR set to a objectpointer
    24. CURLOPT_HEADERFUNCTION set to a functionpointer
    25. CURLOPT_HEADERDATA set to a objectpointer
    26. */
    27. ret = curl_easy_perform(hnd);
    28. curl_easy_cleanup(hnd);
    29. hnd = NULL;
    30. return (int)ret;
    31. }
    32. /**** End of sample code ****/