Simple HTTP support

Johannes Pfau spam at example.com
Fri Feb 25 11:16:55 PST 2011


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.

I remember there was some discussion about that some time ago. Graham
Fawcett has a declarations module here:
https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d .
It's not complete (only wraps the simple curl api), but it's a start.
I think he was even willing to contribute it to phobos, but I'm not
sure.

>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.
>
>
>Andrei

I've been working on a webclient like api now and then, but I haven't
got the time right now to continue it and the code currently is a mess.
The biggest problem I faced is curls 'push interface', you receive all
data in a callback. Webclients in other languages offer a 'pull' /
stream like api and i couldn't find a good way to support that with
curl.

-- 
Johannes Pfau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110225/87370bbe/attachment.pgp>


More information about the Digitalmars-d mailing list