jodd: Madvoc 3->4: Body is empty for `req.getReader()` as well ass `@In @Scope(BODY)`
Current behavior
Sorry, to nag again š
After porting an Madvoc application from v3.x to 4.x it cannot read any PUT Body content. The originally, ported form was:
@Action("/list/{id}") @PUT
public JsonResult updateList(@In("id") String id) {
return GroceryService.get().updateGroceryList(id, request.getReader());
}
I modified it to this form which does not help:
@Action("/list/{id}") @PUT
public JsonResult updateList(@In("id") String id, @In @Scope(BODY) String listJson) {
return GroceryService.get().updateGroceryList(id, new StringReader(listJson));
}
Iām a little bit lost and hope I do not miss anything. Tested it with two web servers to sort out the issue thre.
Expected behavior
request.getReader() and/or @In @Scope(BODY) String listJson should contain the actual request body text.
Steps to Reproduce the Problem
git clone --depth=3 --branch=master https://github.com/bentolor/microframeworks-showcase.git showcase
cd showcase
./gradlew :jodd:run
Then go to http://localhost:8080/, Click āListsā in the left section, āEditā in the List, Remove an item, press Save.
OR
Open Project with IDEA IntelliJ and Run āJodd: Run Exampleā.
OR
./gradlew :jodd:jettyRun
to use Jetty instead of Undertow.
Any ideas what Iām missing?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (15 by maintainers)
This sounds great and absolutely appropriate!
Added everything.
The difference is that
@Mapperis now not only Madvoc but applies on anyBeanUtil, hence it can be used in different situations as well.@igr Currently very busy; will try to respond on weekend. Keep tight!