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)

Commits related to this issue

Most upvoted comments

The difference is that @Mapper is now not only Madvoc but applies on any BeanUtil, hence it can be used in different situations as well.

This sounds great and absolutely appropriate!

Added everything.

The difference is that @Mapper is now not only Madvoc but applies on any BeanUtil, hence it can be used in different situations as well.

@igr Currently very busy; will try to respond on weekend. Keep tight!