cURL-Bigloo: transferring Internet data with Bigloo Scheme
cURL is a command line tool and
libcurl is a
library for transferring data specified with URL syntax.
curl-bigloo.scm provides Bigloo bindings for this library.
Usage (by example):
This is a sample code which gets HTTP header and HTML file from the URL
(print "CURL version: " (curl-version))
(define curl-ptr (curl-easy-init))
(print "URL: "
(curl-easy-setopt curl-ptr (CURLOPT-URL) "http://localhost/index.html"))
(print "FILE: "
(curl-easy-setopt curl-ptr (CURLOPT-FILE) (fopen "index.html" "w")))
(print "WRITE-HEADER: "
(curl-easy-setopt curl-ptr (CURLOPT-WRITEHEADER) (fopen "header" "w")))
(print "Perform: " (curl-easy-perform curl-ptr))
;; Clean up
It have to be linked with libcurl:
bigloo test.scm -lcurl
Please consult cURL manuals for more information.
Many thanks to Vladimir Tsichevski for hints and tips on Bigloo FFI.
curl-bigloo code is in Public Domain.
libcurl is subject of MPL or MIT/X license.
The Bigloo run-time system and the libraries are distributed under the
terms of the GNU Library General Public License
The compiler and the tools are distributed under the terms of the Gnu Public
now provides cURL bindings