[racket] racket and libcURL

From: Ray Racine (ray.racine at gmail.com)
Date: Wed Mar 21 14:00:45 EDT 2012

I have an HTTPClient library that works for GET, PUT, POST for most use
cases where one would use an embedding of a wrapped curl.

It understands chunked encoding and "pipes" the de-chunked HTTP stream to a
port automatically  So for example, you can do a GET of a large file and
stream it to disc without reading the entire file into a byte buffer.  It
also works with HTTPS as well.

Bad news it is still in unpolished at the API level, with limited
scribblings for doc.  But I use it quite heavily for AWS REST API
integration, web scrapping runs of several hours in duration and it is
stable and reasonably fast.

https://github.com/RayRacine/racketlib/tree/master/httpclient

Ray



On Wed, Mar 21, 2012 at 12:52 PM, Neil Van Dyke <neil at neilvandyke.org>wrote:

> Instead of using the FFI, you can also write a library that wraps the
> "curl" command-line executable.  This has the advantages of keeping large
> file I/O out of Racket (lower processing overhead, no GC, schedulable by
> the host OS on other CPUs/cores), and of process isolation (i.e., not
> having additional C code in the same process as the Racket VM, so that less
> risk of the C code causing stability or security programs).
>
> (There is a somewhat fancy "curl" process Racket library that someone
> wrote, but I don't know whether or when they'll be able to open source it.
>  Probably best to just write a simple one that does what you need.)
>
> Neil V.
>
> --
> http://www.neilvandyke.org/
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/**users <http://lists.racket-lang.org/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120321/e952f1e6/attachment-0001.html>

Posted on the users mailing list.