Curl wrapper round two

Johannes Pfau spam at example.com
Wed Jun 22 02:08:04 PDT 2011


jdrewsen wrote:
>Den 21-06-2011 12:49, Johannes Pfau skrev:
>> jdrewsen wrote:
>>> Den 18-06-2011 22:36, jdrewsen skrev:
>>>> 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've made the changes as suggested from your comments and pushed to
>>> the github branch above.
>>>
>>> Changes:
>>>
>>> * Change and delete individual headers when using static convenience
>>> methods
>>> * Make keep-alive work when using static convenience methods
>>> * Add as extra modifiable parameters on follow requests
>>> (keep-alive): headers, method, url, postData
>>> * Add verbose property to Protocol
>>> * No dummy bool in constructors
>>>
>>> Comments are welcome
>>>
>>> /Jonas
>>
>> Great, thanks for including those changes!
>> Another small feature request:
>> Could curl_easy_escape and curl_easy_unescape be made available in
>> the wrapper? I don't like the fact that Curl requires a client
>> instance for these functions, but they're quite useful nevertheless.
>
>I'll add this yes. It pretty weird that there is deprecated 
>curl_escape() which does not need a curl instance. That function
>refers to the newer curl_easy_escape(). They must have had a good
>reason to do so i guess.
>
>> BTW: http://d-programming-language.org/ has newer css stylesheets for
>> documentation. I think with this new style the documentation looks
>> much better. So it'd be great if you could rebuild the documentation
>> with the new std.ddoc and stylesheets from
>> https://github.com/D-Programming-Language/d-programming-language.org
>
>Done
>
>/Jonas
>
Thanks.

Documentation review:

First example:
http.perform; -- http.perform();
Property syntax should only be used for properties.

Protocol.isStopped:
True if the instance is stopped an[d] invalid.

Protocol.dataTimeout:
Connection settings Set timeout for activity on connection
'Connections settings' should be a normal comment in the source code?

Protocol.url
Network settings The URL to specify the location of the resource
'Network settings' should be a normal comment in the source code?

Protocol.setAuthentication:
Set the use[r]name, pas[s]word and optionally domain for authentication
purposes.

Protocol.onSend:
See onSend">Curl.onSend
Is "> really expected?

alias TimeCond:
Maybe add to the docs that TimeCond is an alias for CurlTimeCond?
none ifmodsince ifunmodsince lastmod
last ---> TimeCond.{none,ifmodsince,ifunmodsince,lastmod} ?

Some one-sentence comments have a '.' at the end, others
don't. This should maybe changed to be consistent.

Wonder if there's a good free way to spellcheck a website, that could
be quite useful for the phobos reviews.
-- 
Johannes Pfau



More information about the Digitalmars-d mailing list