ZnClient Chunked data ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ZnClient Chunked data ?

fstephany
I'm using ZnClient to get an XML file and get the following:

Inline image 2

Here's the request:

client := ZnClient new
  url: uri;
  headerAddAll: headers.
client get.

Is the prefix of the entity related to the chunked transfer encoding?
Reply | Threaded
Open this post in threaded view
|

Re: ZnClient Chunked data ?

Sven Van Caekenberghe-2
François,

There is no encoding specified in the response, Zn falls back to ZnNullDecoder by default. You can change that with the recently introduced DynamicVariable ZnDefaultCharacterEncoder. Like this:

ZnDefaultCharacterEncoder
  value: ZnUTF8Encoder new
  during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]

Sven

On 24 Jun 2014, at 18:48, François Stephany <[hidden email]> wrote:

> I'm using ZnClient to get an XML file and get the following:
>
> <Screen Shot 2014-06-24 at 18.46.27.png>
>
> Here's the request:
>
> client := ZnClient new
>   url: uri;
>   headerAddAll: headers.
> client get.
>
> Is the prefix of the entity related to the chunked transfer encoding?


Reply | Threaded
Open this post in threaded view
|

Re: ZnClient Chunked data ?

fstephany
Works great!
Thanks a lot Sven =)


On Tue, Jun 24, 2014 at 8:09 PM, Sven Van Caekenberghe <[hidden email]> wrote:
François,

There is no encoding specified in the response, Zn falls back to ZnNullDecoder by default. You can change that with the recently introduced DynamicVariable ZnDefaultCharacterEncoder. Like this:

ZnDefaultCharacterEncoder
  value: ZnUTF8Encoder new
  during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]

Sven

On 24 Jun 2014, at 18:48, François Stephany <[hidden email]> wrote:

> I'm using ZnClient to get an XML file and get the following:
>
> <Screen Shot 2014-06-24 at 18.46.27.png>
>
> Here's the request:
>
> client := ZnClient new
>   url: uri;
>   headerAddAll: headers.
> client get.
>
> Is the prefix of the entity related to the chunked transfer encoding?