resteasy-reactive: When using own Content-Type for @Produces then quarkus will set 'application/json' as Content-Type header
See original GitHub issueDescribe the bug
When. using @Produces
with non-standard content type with resteasy-reactive will result in ‘application/json’ being set as Content-Type header instead of the requested type.
Expected behavior It should set the requested content type that was requested in the Accept header.
Actual behavior ‘application/json’ is always set.
To Reproduce
Steps to reproduce the behavior:
- Checkout https://github.com/quarkusio/quarkus-quickstarts/tree/development/hibernate-reactive-quickstart
- Add
@Produces("application/vnd.quarkus.fruit-v1+json")
to POST method - Call
curl -H "Accept: application/vnd.quarkus.fruit-v1+json" http://localhost:8080/fruits -d'{"name": "apple"}' -v
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Writing REST Services with RESTEasy Reactive - Quarkus
Each endpoint method may consume or produce specific resource representations, which are indicated by the HTTP Content-Type header, ...
Read more >RESTEasy Classic - Quarkus
This guide is about RESTEasy Classic which used to be the default JAX-RS implementation until Quarkus 2.8. It is now recommended to use...
Read more >Using the REST Client Reactive - Quarkus
When the quarkus-rest-client-reactive-jackson extension is installed, Quarkus will use the application/json media type by default for most return values, unless ...
Read more >Writing JSON REST Services - Quarkus
This is an introduction to writing JSON REST services with Quarkus. A more detailed guide about RESTEasy Reactive is available here.
Read more >Using Reactive Routes - Quarkus
If no content-type header is set, then we will try to use the most acceptable content type by matching the accept header with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, I pushed a second commit to that PR that fixes the problem mentioned in the comments as well
Okay thanks.
I’ll check it out soon