Invalid HTTP method: PATCH > executing PATCH : Caused by: feign.RetryableException:

user2775185 picture user2775185 · Feb 13, 2016 · Viewed 11.3k times · Source

we are using netflix feign to make call to restful web service. For patch request it looks like PATCH request is not supported.

Caused by: feign.RetryableException: Invalid HTTP method: PATCH executing PATCH https://projects.dev.xyz.com/projects/v1/users/{uid}/projects/{guid} at feign.FeignException.errorExecuting(FeignException.java:66) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:100) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:74) at feign.hystrix.HystrixInvocationHandler$1.run(HystrixInvocationHandler.java:54) at com.netflix.hystrix.HystrixCommand$1.call(HystrixCommand.java:294)

Answer

Dirk picture Dirk · Jun 22, 2017

if someone encounters the same problem with spring-cloud-feign, using the httpClient from feign can be achieved by just adding the maven dependency:

    <dependency>
        <!-- Required to use PATCH -->
        <groupId>io.github.openfeign</groupId>
        <artifactId>feign-httpclient</artifactId>
        <version>${feign.version}</version>
    </dependency>