[Pharo-users] Teapot or Zinc adding extra node to JSON POST

BrunoBB smalltalk at adinet.com.uy
Wed Feb 27 16:56:12 EST 2019


Using Teapot (which uses Zinc) i found something i do not know if it is a
standard or done on purpose or a bug.

A Teapot service (POST) accept a JSON entry. In the client the 'body' is set
with the JSON.

In the server the ZnRequest contents insert a JSON node 'body' to the
original JSON.

The original JSON POST is: {name: "John", age: 31, city: "New York"}

At server ZnRequest contents JSON is: {"body":{name: "John", age: 31, city:
"New York"}}

Is this done on purpose by Zinc ?

I try to find if it is a standard in JSON communications but with no luck
yet !
(these are first steps on JSON so maybe is a newbie question :)


Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

More information about the Pharo-users mailing list