Curl wrapper round two

Jacob Carlborg doob at me.com
Wed Jun 22 04:25:44 PDT 2011


On 2011-06-18 22:36, jdrewsen wrote:
> Hi,
>
> I've finally got through all the very constructive comments from the
> last review of the curl wrapper and performed the needed changes.
>
> Here is the github branch:
> https://github.com/jcd/phobos/tree/curl-wrapper
>
> And the generated docs:
> http://freeze.steamwinter.com/D/web/phobos/etc_curl.html
>
> I do have some problems getting ddoc to show the documentation of
> mixins. So in order to view the doc for byLine/byChunk methods you have
> to look at the source.
>
> Anyway...this is what I've been up to:
>
> New features:
>
> * Full support for async/sync by line/chunk
> * FTP support extended from only allowing download of a file sync into
> full async/sync by line/chunk support
> * Allow providing parameters such as credentials/timeouts when using the
> convenience statis methods.
>
> Changes caused by last review:
>
> * rethink byLine/... to not return string in order to prevent
> allocations. they should return char[]/ubyte[]
> * 80 chars
> * Http.Result not HttpResult
> * gramma for http.postData
> * len -> length
> * perform http request -> perform a http ...
> * authMethod to property
> * curltimecond alias into module
> * followlocation -> maxredirs
> * http not class anymore but struct
> * timecondition use std.datetime
> * timeouts use core.duration
> * Spelling "callbacks is not supported"
> * refer to HTTP RFC describing the methods
> * login/password example
> * chuncked -> chunked
> * max redirs; use uint.max and not -1
> * isRunning returining short
> * 4 chars tabs in examples.
> * no space in examples.
> * Send/recv use special structs in order not to mess with other
> communications
>
> Comments are welcome.
>
> /Jonas

A couple of comments:

* The documentation for the callback functions are referring to Curl 
which is not documented.

* Why are you using "typeof" in the PUT example?

* The PUT example seems unnecessary complicated. Why can't the "onSend" 
callback simply return the data instead, am I missing something obvious?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list