Op 28-9-2020 om 21:11 schreef Sven Van Caekenberghe:
You *really* should read the HTTP chapters of http://books.pharo.org/enterprise-pharo/

in particular https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-HTTP-Client/Zinc-HTTP-Client.html

not just the Web App chapters.

Also, any general introduction to HTTP (maybe even https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) will help you.

You can just say

 response statusLine

You also really, really have to learn how to use the tools (the IDE) to help yourself. If you browse the ZnResponse class, you can see all this for yourself. I know there is a steep learning curve, and that it can be intimidating, but the whole idea behind Pharo is that you have this living object system that you can explore and learn from.

The introduction texts (Pharo By Example, the MOOC, etc) all try to learn you that.

Use spotter to find things, use browsers to look at code, use inspectors to look at objects, use senders and implementers, use class references, read class and method comments, study unit tests. Learn from the system.

BTW, ZnEasy is just a simple class side facade, ZnClient is the real thing.


Thanks,

I think this could help me :

ZnClient new
   enforceHttpSuccess: true;
   ifFail: [ :ex | self inform: 'Cannot get numbers: ', ex printString ];
   get: 'http://zn.stfx.eu/zn/numbers.txt'.

I will try it tomorrow after some sleep 


Roelof


Reply via email to