[
https://issues.apache.org/jira/browse/CXF-4782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635084#comment-13635084
]
Jason Chaffee commented on CXF-4782:
------------------------------------
Hi Sergey,
I didn't get a chance to try it. I am no longer working on that project where
we needed to do that so it passed it off to someone else and I am not sure if
they tried that or not.
Is there a way in the future where we can just configure it like we can the
callback fo r json with padding?
> Cannot easily override the Accept content type
> ----------------------------------------------
>
> Key: CXF-4782
> URL: https://issues.apache.org/jira/browse/CXF-4782
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.2
> Reporter: Jason Chaffee
>
> I need to add the ability to override the Accept header using a query
> parameter. I know CXF supports "_type", but there are two problems with the
> way that is implemented that won't work for us. 1) We need to parameter name
> to be "format" instead of "_type" and currently this is not configurable. 2)
> We need to be able to pass in a map of special type that we would like to
> map. This would added to the SHORTCUTS.
> Since the current RequestPreProcessor doesn't allow for either one of those,
> I decided to write a JAXRS Filter/RequestHandler. The problem I found is
> that the JAXRSInInterceptor has already looked up the acceptContentType
> before my RequestHandler.handleRequest() method is called. Thus, I am unable
> to override it using this approach.
> Ideally, the fix would be to simply make them configurable in the
> RequestPreProcessor. However, I am not quite sure how that would be done
> since this is not a class that is managed/configured in the IoC/DI container.
>
> Another approach would be to call the RequestHandlers before resolving the
> acceptContentType.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira