eclipse-ee4j / eclipse-ee4j/jersey

JerseyTest - Grizzly does not process BODY with DELTE commands.

Open
#3,715 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

I created a simple DELTE action with a Rest interface:

` @DELETE
@Path("/systemuser/{organisation}/")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Deletes the given system user from the organisation indicated by shortname.")
@ApiResponses(value = {@ApiResponse(code = 204, message = "System User is deleted"),
@ApiResponse(code = 400, message = "No valid system user data provided"),
@ApiResponse(code = 401, message = "Not authenticated")})
public Response deleteSystemUser(@PathParam("organisationShortName") String organisation, @javax.validation.constraints.NotNull List users) {
return LogInfo.logDuration(log, "deleteSystemUser", () -> {
log.info("Deleted users {}", users);
return handleExceptions(() -> {
accountsService.deleteSystemUser(organisationShortName, users);
return Response.status(204) //
.build();
});
});
}`

And I try to test this with a simple JersyTest to see if all is well. But it seems that the Grizzly container is a bit strict on this implemenation and ignores the HTTP body. And seeing I dont want the list of ussers in query parameters I now have to put a test on ignore.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.