OpenFeign/feign

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

Ouverte

#1 239 ouverte le 10 juin 2020

 (9 commentaires) (5 réactions) (0 personne assignée)Java (1 911 forks)batch import
bughelp wantedneeds info

Métriques du dépôt

Stars
 (9 070 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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

Guide contributeur