feign icon indicating copy to clipboard operation
feign copied to clipboard

ApacheHttpClient - enable/disable follow redirect via Request.Options

Open trumple opened this issue 3 years ago • 2 comments

Hi there.

With spring-cloud-openfeign, it is possible to specify feign configuration by client with :

feign:
    client:
        config:
            feignName:
                connectTimeout: 1000
                follow-redirects: false

But when using the ApacheHttpClient, the property follow-redirects is ignored (whereas connectTimeout is ok)

I think it could be achieve by adding :

.setRedirectsEnabled(options.isFollowRedirects())

line 95 of ApacheHttpClient

trumple avatar Nov 23 '22 16:11 trumple

line 95 of ApacheHttpClient

feel free to open a pull request. Please include tests.

velo avatar Nov 24 '22 17:11 velo

https://github.com/OpenFeign/feign/pull/1861

trumple avatar Nov 25 '22 15:11 trumple