Re: [gnet-dev] Request for Comments: GConnHttp



Tim,

Excellent job!

I've taken a quick look at this.  Overall, I like the API.  I'll take a
deeper look at the code this weekend.


On Tue, 2004-04-20 at 12:14, Tim Müller wrote:
> I've written some code to perform simple http POST/GET operations using a GNet 
> GConn. So far it seems to work quite okay, but it hasn't been extensively 
> tested, nor has HTTP/1.1-compliance been checked thoroughly. 

Unit tests are a plus.  We could probably do something quick using
netcat.

>  * I was aiming for a minimal API. Currently, the shortest way to retrieve a
>     file goes like this (without much error checking):

Yes, keep it simple for the first version.

It'd be nice to have a gnet_http_get(url) function that just returned a
buffer of data.  Though that looks very easy to write with this library.

> * Rather than going for a trizillion _get functions I decided to use a
>    callback mechanism (which is optional) with event-dependent 
>[...]
>
> * I decided not to 'derive' explicitely from GConn, but keep the 
>    GConnHttp structure opaque. I don't see a reason why people
>[...]

I agree, that's fine.


> * The namespace is a bit awkward, but still better than creating
>    confusion by clashing with the (abandoned?) ghttp library namespace.

Maybe it should be gnet_http_conn_*()?

> TODO:
>    * support for http proxies
>    * authentication support

Probably not necessary for the first version.

>    * checking for HTTP/1.1 standard compliance (or even 1.0 really)

1.0 is necessary, but these aren't difficult protocols.

David

-- 
David Helder - dhelder gizmolabs org - http://www.gizmolabs.org/~dhelder




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]