- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Closed
Labels
bugUnexpected or incorrect behaviorUnexpected or incorrect behaviorregressionBugs and issues related to unintended breaking changesBugs and issues related to unintended breaking changes
Description
After migration from 9.x to 10.x version feign adds slash between path and query.
Please take a look at my code:
public interface AbsInterface {
    @RequestLine("GET")
    Response absRequest(URI url);
}
public okhttp3.OkHttpClient createOkHttp3Client() {
    okhttp3.OkHttpClient.Builder builder = new okhttp3.OkHttpClient.Builder();
    builder.addInterceptor(new RedirectInterceptor());
    builder.readTimeout(TIMEOUT_MINUTES, TimeUnit.MINUTES);
    builder.writeTimeout(TIMEOUT_MINUTES, TimeUnit.MINUTES);
    return builder.build();
}
AbsInterface absInterface = Feign.builder()
                .client(new OkHttpClient(createOkHttp3Client()))
                .logLevel(Logger.Level.FULL)
                .target(Target.EmptyTarget.create(AbsInterface.class));
absInterface.absRequest(new URI("http://localhost:8080/path?query=test"));
// produces http://localhost:8080/path/?query=test request
You can see additional slash appeared between path and query. I found out there's big refactoring of https://github.com/OpenFeign/feign/blob/2ba96239dc48e5906702491a027263cf631df092/core/src/main/java/feign/RequestTemplate.java, pay attention on the path() method
gdemecki and madhead
Metadata
Metadata
Assignees
Labels
bugUnexpected or incorrect behaviorUnexpected or incorrect behaviorregressionBugs and issues related to unintended breaking changesBugs and issues related to unintended breaking changes