Hello Everybody. I am implementing an architecture of rest services like in TinyBlog tutorial. Now I want to implement post methods. But it doesn't work. My execute function execute | user u | [ user := NeoJSONReader fromString: self context request rawBody. u := User new pseudo: (user at: #pseudo); numero_telephone: (user at: #numero_telephone). user save. ] on: Error do: [ self context request badRequest ]. self dataType: WAMimeType textPlain with: '' neojsonmapping on class User neoJsonMapping: mapper mapper for: self do: [ :mapping | mapping mapAllInstVars ] The restfilter consumes */json. I test it with ZnClient but that is not working. ZnClient new url: 'http://localhost:8080/Application/users/add'; formAt: 'pseudo' put: 'Big man'; formAt: 'numero_telephone' put: '99546321'; post. I don't know what is the matter. Thanks. Asbath
participants (1)
-
Asbath Sama biyalou