feignopenfeign

Can i disable pct-encoding in OpenFeign for @RequestLine annotation?


I have a use case where URI comes from external source in the string format and is already pct-encoded.

I defined my interface like this:

    @RequestLine("GET {path}")
    String getMeStuff(@Param("path") String path);

But when path variable expands, it will be pct-encoded by Feign. This results in "double encoding".

Is there a way to pass path variable as is to Http Request line?


Solution

  • I used approach suggested by @velo on OpenFeign Github issues

    @RequestLine("GET")
    String getMeStuff(URI uri);