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. <div><br></div><div>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.<div>
<br></div><div>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. </div>
<div><br></div><div><a href="https://github.com/RayRacine/racketlib/tree/master/httpclient">https://github.com/RayRacine/racketlib/tree/master/httpclient</a></div><div><br></div><div>Ray</div><div><br></div><div><br><div>
<br><div class="gmail_quote">On Wed, Mar 21, 2012 at 12:52 PM, Neil Van Dyke <span dir="ltr"><<a href="mailto:neil@neilvandyke.org">neil@neilvandyke.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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).<br>
<br>
(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.)<br>
<br>
Neil V.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
<a href="http://www.neilvandyke.org/" target="_blank">http://www.neilvandyke.org/</a><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</font></span></blockquote></div><br></div></div></div>