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 Pascal Binding

CurlPas -- accessing libcurl from Pascal

CurlPas is a FreePascal - Lazarus - Delphi - Kylix - compatible binding and object-oriented wrapper for libcurl.

Libcurl is a web-client library that can provide cross-platform Pascal applications with an easy way to implement such things as:

  • Download files using FTP or HTTP.
  • Upload files using FTP,  HTTP PUT and multipart/form-data (aka rfc1867).
  • Perform multiple concurrent transfers using the curl_multi interface.
  • Resume partial file transfers.
  • Timeout settings for connect, minimum transfer speed, and total download time.
  • Username:password authentication to remote and/or proxy servers.
  • SSL/TLS connections using the OpenSSL or GnuTLS libraries.
  • Retrieve resource information such as HTTP HEAD or FTP LIST.
  • Send and receive cookies ( from a NS cookie file, or input/output strings ).
  • Send "spoofed" headers such as User-Agent and Referer.
  • Set additional custom HTTP headers as required.
  • Support for remote FTP commands like MKDIR, DEL, and CHMOD.
  • Generate "human-readable" error output and/or logs on failed transfers.
  • And much more...

CurlPas also includes the tCurl and tCurlMulti components, to provide an easy to use "wrapper" around libcurl.
( This provides simple get/set properties for libcurl's options and information functions, event-based hooks to
libcurl's I/O, status, and progress callbacks, and wraps the c-style file I/O behind simple filename properties. )


All details on CurlPas is found on the CurlPas web page:

A simple http download program...

  program simple;
  uses curlobj;
    Curl: TCurl;
    Curl := TCurl.Create(nil);
    Curl.URL := '';
    Curl.OutputFile := 'curl.html';
    if not Curl.Perform then
( Several more complex examples are included with the CurlPas sources. )

Binding documentation
Documentation for the component wrapper can be found in the source package,
and on the CurlPas website.

The core pascal bindings are quite similar to their C-language equivalents,
read the libcurl documentation for information, in particular:

  • man libcurl
  • man curl_easy_setopt
  • man curl_easy_getinfo

Written by Jeffrey Pohlmeyer.

What is Pascal?
You'll find more info Free Pascal here:

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

File upload with ASP.NET