OpenFeign/feign

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

Open

#1239 aperta il 10 giu 2020

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

Metriche repository

Star
 (9070 star)
Metriche merge PR
 (Merge medio 2g 17h) (71 PR mergiate in 30 g)

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