Simple HTTP support

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Mar 1 14:32:43 PST 2011


On 3/1/11 3:54 PM, Jonas Drewsen wrote:
> On 25/02/11 16.01, Andrei Alexandrescu wrote:
>> On 2/25/11 8:48 AM, Jonas Drewsen wrote:
>>> Hi,
>>>
>>> My first post here so I don't know if this is the right place.
>>>
>>> I like how phobos is coming along but really miss a HTTP client and I
>>> think it should be a part of the standard library.
>>>
>>> Is anyone working on this currently?
>>>
>>> Any thoughts/heads-up if I decide to go ahead an implement it myself
>>> e.g. regarding ranges and other stuff?
>>>
>>> Is it at all possible to get such thing accepted in phobos if someone
>>> implemented it (and the quality is good enough)?
>>>
>>> Thanks
>>> Jonas
>>
>> Here's what I think would be great to do:
>>
>> 1. A declarations module for libcurl. We'd put that in etc. You wouldn't
>> even need to go through the review process, the need and the benefits
>> are obvious. Nobody has had a chance to do that yet.
>>
>> 2. An API design that is safe (libcurl uses void* and unsafe idioms all
>> over the API) based on libcurl and integrates well with the rest of
>> Phobos. This would ideally be discussed prior to implementation and will
>> need to go through a review.
>>
>> If you do 1, it would be an awesome good step forward.
>
> So I've been trying to begin this curl declarations module. I looked a
> libcurls home page and there already is a D binding:
>
> http://curl.haxx.se/libcurl/d/
>
> This one uses the htod tool to make a declaration module from the
> libcurl headers and creates a curldef.d file.
>
> In addition to this it defines a normal D class (libcurl.d) that wraps
> only the basic curl functionality in order to provide a nicer interface.
>
> I haven't created a declaration module before so my question is whether
> this would also be the right approach for a module in phobos 'etc'?
>
> /Jonas

I found that link too in my searches but it's been dead for a good 
while. I thought it has gotten dark. We could of course use it if we 
secure author's permission.

Andrei


More information about the Digitalmars-d mailing list