curl_setopts_basic   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/curl.xtm

Implementation

(bind-func curl_setopts_basic
  (lambda (handle cdat:curl_dat*)
    (curl_easy_setopt handle
                      CURLOPT_WRITEFUNCTION
                      (get_native_fptr curl_write_callback))
    (curl_easy_setopt handle CURLOPT_WRITEDATA (cast cdat i8*))
    ;; follow redirects = TRUE
    (let ((followopt:CURLoption* (salloc)))
      (pset! followopt 0 1)
      (curl_easy_setopt handle CURLOPT_FOLLOWLOCATION (cast followopt i8*)))
    ;; user agent string
    (curl_easy_setopt handle CURLOPT_USERAGENT (curl_version))))


Back to Index

Similar Entries