-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Given a resource method like
@Path("test") public static class TestResource { @POST @Path("form") public String formParam(@FormParam("fp") String fp, String content) { return fp + "|" + content; }
and
ResteasyClient client = new ResteasyClientBuilder().build(); Invocation.Builder request = client.target("http://localhost:8081/test/form").request(); Response response = request.post(Entity.entity("fp=abc", "application/x-www-form-urlencoded")); System.out.println("response: " + response.readEntity(String.class));
the output will be
response: abc|
because the entity will get eaten in the course of retrieving the form parameter.