Haxx ad

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on


cURL > libcurl > libcurl O´Caml Binding

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

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


  let _ =
    let connection = Curl.init () in
      Curl.setopt connection (Curl.CURLOPT_URL Sys.argv.(1));
      Curl.perform connection
  > ocamlc -I +curl curl.cma -o simple

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

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:

Written by Lars Nilsson

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:

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET