curl_request   xtlang


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

Implementation

(bind-func curl_request
  (let ((handle:CURL null)
        (cdat:curl_dat* (zalloc)))
    (lambda (url:i8* dat:i8*)
      ;; init data structures
      (set! handle (curl_easy_init))
      (tset! cdat 0 dat)
      (tset! cdat 1 0)
      (curl_easy_setopt handle CURLOPT_URL url)
      (curl_setopts_basic handle cdat)
      (curl_perform_request handle cdat))))


Back to Index

Similar Entries