(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))))