[Pharo-users] ZnClient receiving Expires header with Max-Age instead of HTTP formatted DateAndTime

2018-09-10 Thread PAUL DEBRUICKER
Hi Sven - This is in Pharo 6.1. There is an API I'm using which sometimes returns a string only containing a single instance of the number 0 in the "Expires" field, so the #expiresTimeStamp method sends that to #parseHttpDate: and since it can't be parsed into a date an error is thrown.

Re: [Pharo-users] Query on Pharo syntax

2018-09-10 Thread Ben Coman
Its a very interesting and elegant aspect of Pharo and I'm sure there are others at different parts of their journey learning Pharo who learnt something new from your question. cheers -ben On Tue, 11 Sep 2018 at 03:13, PBKResearch wrote: > Thanks Ben – it’s all clear now. Thanks also to

Re: [Pharo-users] Query on Pharo syntax

2018-09-10 Thread PBKResearch
Thanks Ben – it’s all clear now. Thanks also to Esteban, who spared my blushes by answering direct! Peter Kenny From: Pharo-users On Behalf Of Ben Coman Sent: 10 September 2018 19:56 To: Any question about pharo is welcome Subject: Re: [Pharo-users] Query on Pharo syntax On Tue, 11

Re: [Pharo-users] legitimate values for ZnClient>>accept:

2018-09-10 Thread Ben Coman
On Tue, 11 Sep 2018 at 02:50, Sven Van Caekenberghe wrote: > Ben, > > > On 10 Sep 2018, at 20:36, Ben Coman wrote: > > > > Hi Sven, > > > > I had a sample http request specified to have ```Accept-Encoding: gzip``` > > and too a guess the following would work... ```client := ZnClient new >

Re: [Pharo-users] Query on Pharo syntax

2018-09-10 Thread Ben Coman
On Tue, 11 Sep 2018 at 02:44, PBKResearch wrote: > Hi All > > > > This is an idiot question, I should know the answer, but I have looked > around and can’t find relevant documentation. I’m not asking for a full > answer, just a pointer as to where to start looking. > > > > I have seen from

Re: [Pharo-users] legitimate values for ZnClient>>accept:

2018-09-10 Thread Sven Van Caekenberghe
Ben, > On 10 Sep 2018, at 20:36, Ben Coman wrote: > > Hi Sven, > > I had a sample http request specified to have ```Accept-Encoding: gzip``` > and too a guess the following would work... ```client := ZnClient new accept: > 'gzip' ``` > but it doesn't since ZnClient>>accept: > effectively

[Pharo-users] Query on Pharo syntax

2018-09-10 Thread PBKResearch
Hi All This is an idiot question, I should know the answer, but I have looked around and can't find relevant documentation. I'm not asking for a full answer, just a pointer as to where to start looking. I have seen from examples in this forum that an expression like the following:

[Pharo-users] legitimate values for ZnClient>>accept:

2018-09-10 Thread Ben Coman
Hi Sven, I had a sample http request specified to have ```Accept-Encoding: gzip``` and too a guess the following would work... ```client := ZnClient new accept: 'gzip' ``` but it doesn't since ZnClient>>accept: effectively does ``` 'gzip' asZnMimeType ``` which expects the string to contain a

Re: [Pharo-users] [Esug-list] Internet of Things in Smalltalk - meeting proposal

2018-09-10 Thread teso...@gmail.com
Nice idea. I will try to be there. On Mon, 10 Sep 2018, 16:09 Cédrick Béler, wrote: > Hi, > > We will have a meeting Tuesday afternoon on IoT at esug. > > More info later to see how we organize that. > > Should be after « show us your project » around 5 or 6 am. > > More info later especially

Re: [Pharo-users] Internet of Things in Smalltalk - meeting proposal

2018-09-10 Thread Guillermo Polito
I'll be there :) On Mon, Sep 10, 2018 at 4:09 PM Cédrick Béler wrote: > Hi, > > We will have a meeting Tuesday afternoon on IoT at esug. > > More info later to see how we organize that. > > Should be after « show us your project » around 5 or 6 am. > > More info later especially on where the

[Pharo-users] Internet of Things in Smalltalk - meeting proposal

2018-09-10 Thread Cédrick Béler
Hi, We will have a meeting Tuesday afternoon on IoT at esug. More info later to see how we organize that. Should be after « show us your project » around 5 or 6 am. More info later especially on where the meeting will take place (might be around the beach). See you later for those

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Sven Van Caekenberghe
It would probably help if you gave a real example, a REST call that returns something (presumable JSON or XML) that contains a URL that is problematic. FWIW, the following do also work ('https://en.wikipedia.org/wiki/' , 'Česká republika' urlEncoded) asUrl. ('https://en.wikipedia.org/wiki/' ,

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Petr Fischer via Pharo-users
--- Begin Message --- OK. Thanks for examples. But in my case, the bad URL (with diacritics) comes directly from the Zomato.com REST API (they probably do not read specs), so I'll end up with a few "hacks" with strings. pf > Hi, > > > On 10 Sep 2018, at 12:53, PBKResearch wrote: > > > > Hi

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Sven Van Caekenberghe
Hi, > On 10 Sep 2018, at 12:53, PBKResearch wrote: > > Hi Petr > > I have used #urlEncoded in the past, with success, to deal with German > umlauts. The secret is to urlEncode just the part containing the diacritics. > If you encode the whole url, the slashes are encoded, and this confuses

Re: [Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread PBKResearch
Hi Petr I have used #urlEncoded in the past, with success, to deal with German umlauts. The secret is to urlEncode just the part containing the diacritics. If you encode the whole url, the slashes are encoded, and this confuses Zinc, which segments the url before decoding. So I would

[Pharo-users] ZnURL and parsing URL with diacritics

2018-09-10 Thread Petr Fischer via Pharo-users
--- Begin Message --- Hello, when I try to parse this URL asUrl, error "ZnCharacterEncodingError: ASCII character expected" occurs: 'http://domain.com/ěščýž.html' asUrl. this also does not work: ZnEasy get: 'http://domain.com/ěščýž.html' How to solve this? In the web browser, URL with