question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

resteasy-reactive: When using own Content-Type for @Produces then quarkus will set 'application/json' as Content-Type header

See original GitHub issue

Describe 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:

  1. Checkout https://github.com/quarkusio/quarkus-quickstarts/tree/development/hibernate-reactive-quickstart
  2. Add @Produces("application/vnd.quarkus.fruit-v1+json") to POST method
  3. Call curl -H "Accept: application/vnd.quarkus.fruit-v1+json" http://localhost:8080/fruits -d'{"name": "apple"}' -v

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, Dec 24, 2020

Actually, I pushed a second commit to that PR that fixes the problem mentioned in the comments as well

1reaction
geoandcommented, Dec 24, 2020

Okay thanks.

I’ll check it out soon

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found