Skip to content

Add "application/*+xml" as supported media type to XML decoders #24164

@Chr3is

Description

@Chr3is

The Jackson2JsonDecoder supports own media types out of the box because it accepts application/*+json by default. The same does not work with xml (Jaxb2XmlDecoder). If you want to handle a xml response (with an own mediatype eg application/my.type+xml) with the spring webclient you'll get an error because no decoder can be found. You have to manually extend the Jaxb2XmlDecoder and let him accept any xml mediatype through the constructor and register this new decoder in the webclient. I think the Jackson and Jaxb decoder should behave the same way.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions