Hi,

I’m trying to hack something with Pharo 6.1 and Phillips Hue[1] (they have a 
simple REST API). When I try to do a GET request with Zinc like this:

ZnClient new
        url: 
'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
        get

I get a “ConnectionClosed: Connection closed while waiting for data” exception. 
The service provides a JSON response that I can get without a problem by using 
a web browser or curl. Also if I try to access fewer data (e.g. adding /1 to 
the url, so it gets only one resource) I don’t get the exception.

What is even more strange, when I resume the exception I get the desired 
response i.e. this works:

[ ZnClient new
        url: 
'http://192.168.0.115:80/api/1028d66426293e821ecfd9ef1a0731df/lights/';
        get ]

        on: ConnectionClosed
        do: [ :ex |
                ex resumeUnchecked: ex defaultResumeValue ]

Of course I cannot share the server that is on my local network for resting, 
but maybe anyone knows it there are any known issues with Zinc, or if there are 
ways for me to debug the issue further.

Cheers.
Uko

[1]: https://www.developers.meethue.com

Reply via email to