OpenFeign/feign

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

オープン

#1,239 opened on 2020/06/10

 (9 件のコメント) (5 件のリアクション) (0 人の担当者)Java (1,911 件のフォーク)batch import
bughelp wantedneeds info

Repository metrics

Stars
 (9,070 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド