OpenFeign/feign

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

Offen

#1.239 geöffnet am 10.06.2020

 (9 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)Java (1.911 Forks)batch import
bughelp wantedneeds info

Repository-Metriken

Stars
 (9.070 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide