OpenFeign/feign

Can't set Content-type for Request Header when use Spring annotations

Open

#1,239 创建于 2020年6月10日

在 GitHub 查看
 (9 评论) (5 反应) (0 负责人)Java (1,911 fork)batch import
bughelp wantedneeds info

仓库指标

Star
 (9,070 star)
PR 合并指标
 (平均合并 2天 17小时) (30 天内合并 71 个 PR)

描述

I'm using Feign and Spring annotations, I have a request that expects to accept "text/plain".

@PostMapping(value = "/demo", consumes = "application/json", produces="text/plain")
public String demo(@RequestBody List<Long> ids);

But, the produces value not working. The request still has a header: Accept=application/json

贡献者指南