Oct. 1, 2010
12:31 p.m.
Lukas, 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 ? Sven