(ZnServer defaultOn: 1337) logToTranscript; delegate: (ZnValueDelegate with: [ :request | ZnResponse ok: (ZnEntity text: 'Hello World!') ]); start.
ZnClient get: 'http://localhost:1337'.
(ZnServer defaultOn: 1337) logToTranscript; delegate: (ZnValueDelegate with: [ :request | ZnResponse ok: (ZnEntity with: request contents) ]); start.
ZnClient post: 'http://localhost:1337' data: (ZnEntity text: 'Echo').
ZnServer stopDefault.
Smalltalk is a beautiful language, isn't it ?
or even: hello world: ((ZnServer defaultOn: 1337) delegate: (ZnDispatcherDelegate new map: '/' to: [ :request :response | response entity: (ZnEntity text: 'Hello World!') ])) start echo: ((ZnServer defaultOn: 1337) delegate: (ZnDispatcherDelegate new map: '/' to: [ :request :response | response entity: (ZnEntity with: request contents) ])) start