Skip to content

Multiple MediaTypes in produces not working correctly #916

@jnt0r

Description

@jnt0r

Describe the bug
When I define a feign client with two MediaTypes in produces (produces={MediaType.APPLICATION_PDF_VALUE, MediaType.APPLICATION_JSON_VALUE}), the client only sends the first value in the accept header.

I would expect the client to send both MediaTypes in the Accept header, separated by comma.

Current workaround
The current workaround for me is to specify the produces attribute as String:
produces=MediaType.APPLICATION_PDF_VALUE + "," + MediaType.APPLICATION_JSON_VALUE
Then the accept header is send as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions