OpenFeign / feign

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

Allow optional request body #2616

Closed gromspys closed 2 weeks ago

gromspys commented 1 month ago

Issue: https://github.com/OpenFeign/feign/issues/1383

velo commented 2 weeks ago

Although I have approved this, I'm still unsure... why not having a method that just omits the body and be a bit more deterministic? I bet ya the average client will have other methods where the body is not optional and marking all bodies as optional will bring lot's of pain.

gromspys commented 2 weeks ago

I think there is some restrictions (client can be generated by swagger or something else). Also parameter can be passed from upstream service and can be null.