#include "_doctype.html" libcurl for O'Caml #include "css.t" #define LIBCURL_OCAML #define CURL_URL libcurl/ocaml #include "_menu.html" #include "setup.t" WHERE2(libcurl, "/libcurl/", libcurl O´Caml Binding) TITLE(accessing libcurl from O´Caml)

O'Caml bindings to libcurl. The library provides an interface to the curl_easy functions (the multi functions are not supported at this point in time).
The sources are available at
http://sourceforge.net/projects/ocurl

How to Install
The following steps will create a subdirectory, curl, in the standard O'Caml library directory and install the necessary files there.

  > tar xfz ocurl-0.1.tar.gz
  > cd curl
  > ./configure
  > make
  > make install
When compiling a code that makes use of the ocurl library "-I +curl" should be given (see the sample compilation below).

Examples
Sample: simple.ml

  let _ =
    let connection = Curl.init () in
      Curl.setopt connection (Curl.CURLOPT_URL Sys.argv.(1));
      Curl.perform connection
Compilation:
  > ocamlc -I +curl curl.cma simple.ml -o simple
Execution:
  ./simple http://slashdot.org

Binding documentation
Currently there is no documentation. The Curl.setopt function follows the C API closely, so until proper documentation is available I recommend looking at curl.mli in combination with the manual/html page for curl_easy_setopt().

Download
The current version is 0.1. Since this is the very first release there may be bugs waiting to be discovered by YOU. Feedback is gratefully accepted. :)
SourceForge location: http://sourceforge.net/projects/ocurl/

Credits
Written by Lars Nilsson
http://www.quantumchamaeleon.com

What is O'Caml?
O'Caml is a strongly typed, functional programming language, and combines type-safety with speed.

You'll find more info O'Caml here:
http://caml.inria.fr/
http://www.ocaml.org/ #include "_footer.html"