This library has procedures that allow Guile to do client-side URL transfers, like requesting documents from http or ftp servers. It is based on the libcurl library.
This manual describes guile-curl version 1.0.1.
Starting with version 1.0.0, guile-curl uses semantic
versioning: a version number has the form
major.minor.micro, where the major number changes for
incompatible changes, the minor number for new features, and the micro
number for bug fixes. It requires libcurl 7.76.0 or later.
Before using these functions, you must first load the library. If the
library built and installed correctly, you should be able to load the
library in the usual way by using (use-modules (curl)).
To transfer a file, you start off by creating a handle using
curl-easy-init. curl-easy-init is a procecure that
takes no arguments and returns a handle. The handle represents a
single connection between computers using some standard protocol.
The handle holds opaque information used by the underlying
libcurl library, so displaying it or writing it doesn’t produce
much useful information beyond the location of a pointer in memory.
Before the handle can be used, it must first be given information
about the connection and transfer that it will do. The procedure
curl-easy-setopt is used to tell this handle’s connection how
to behave. There are many dozens of options that can be set, but,
at a minimum, it just needs a URL.
Then, to initiate the transfer, the procedure curl-easy-perform
is called. It can return the requested resource as either a bytevector
or a string. If the data is returned as a string, no coding conversions
will be performed, e.g., the program will presume that the data is in
the Latin-1 encoding.