-
Bug
-
Resolution: Done
-
Major
-
2.3.5.Final
-
None
When I POST to a method that has a MultivaluedMap parameter, my MessageBodyReaderInterceptor does not trigger. Example:
@POST @Path("/role") @Produces({"application/json", "application/xml"}) public List<MyObject> post(MultivaluedMap<String, String> formParams) { // dostuff }
However, if I only use a plain String as parameter, the MessageBodyReaderInterceptor triggers as expected. Example:
@POST @Path("/roletest") @Produces({"application/json", "application/xml"}) public List<MyObject> postWithoutMultivaluedMap(String formParams) { // dostuff }
Also, I am unable to get the MessageBodyReaderInterceptor for any GET requests.
The interceptor looks like this:
@Provider @ServerInterceptor @Precedence("SECURITY") public class MyInterceptor implements MessageBodyReaderInterceptor { public Object read(MessageBodyReaderContext context) throws IOException, WebApplicationException { System.err.println("MyInterceptor.read()"); return context.proceed(); } }
I have an example project for this issue at https://github.com/henrik242/resteasy-interceptor-demo
This issue might be related to RESTEASY-568
- is related to
-
RESTEASY-567 Reading the input stream in a Pre-process interceptor should not result in @FormParam parameters being null
- Resolved
-
RESTEASY-568 MessageBodyReaderInterceptors that implement AcceptedByMethod interface are not called for Resteasy service methods that use any of the method parameter annotations like @FormParam
- Closed
-
RESTEASY-796 Cannot not find MessageBodyWriter of media type application/x-www-form-urlencoded for ExceptionMapper
- Closed
-
RESTEASY-814 RESTEasy Interceptor Related Issues Tracker Bug
- Closed