OpenFeign/feign

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

Open

Aperta il 10 giu 2020

Vedi su GitHub
 (9 commenti) (5 reazioni) (0 assegnatari)Java (9070 star) (1911 fork)batch import
bughelp wantedneeds info

Descrizione

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

Guida contributor