OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.51k stars 1.93k forks source link

Add configuration options to allow empty headers #2539

Open getaceres opened 2 months ago

getaceres commented 2 months ago

Hello, I'm trying to implement a client for a Web Service using Feign. The problem with web services is that they always require sending a SOAPAction even if that header is empty. Right now, the Feign template removes empty headers as per documentation:

` Request Headers Expansion Headers and HeaderMap templates follow the same rules as Request Parameter Expansion with the following alterations:

Unresolved expressions are omitted. If the result is an empty header value, the entire header is removed. `

This makes impossible to call this kind of web services using Feign.

It would be nice to have a configuration option in the Feign builder to enable sending empty headers if present.

kdavisk6 commented 2 months ago

Do you have a proposal in mind?