[Pharo-project] [Progress Report] Zinc HTTP Components

Sven Van Caekenberghe sven at beta9.be
Fri Oct 1 08:31:39 EDT 2010


On 01 Oct 2010, at 14:10, Lukas Renggli wrote:

> What I would like to see is some kind of high-level API for convenient
> access to all features. Something along
> response := ZnHttp new
>    url: 'http://www.foo.com';
>    userAgent: 'FakeAgent';
>    cookieAt: 'something' put: '123';
>    parameterAt: 'q' put: 'smalltalk';
>    onFailure: [ :error | self inform: 'failed' ];
>    onProgress: [ :status | ... ];
>    get

A bit like Gofer I guess...

It certainly looks cool, the code above.

I'll have to think a little bit about that approach.

How should such an object handle wrong use of the API ?
What if I don't specify an url, do the get before setting the cookie, ...
It feels as if there will be little feedback in terms of errors, no ?


More information about the Pharo-dev mailing list