Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read-me.md mybe wrong ? #1131

Closed
switchYello opened this issue Dec 13, 2019 · 1 comment · Fixed by #1147
Closed

Read-me.md mybe wrong ? #1131

switchYello opened this issue Dec 13, 2019 · 1 comment · Fixed by #1147
Labels
documentation Issues that require updates to our documentation help wanted Issues we need help with tackling

Comments

@switchYello
Copy link
Contributor

jdk 11
Feign 10.7.0

I read README.md,it has this description,

What about slashes? /
@RequestLine and @QueryMap templates do not encode slash / characters by default. 
To change this behavior, set the decodeSlash property on the @RequestLine to false.

My understanding is @QueryMap will not encode slash to %2F, but in my test cast,/ still encoded to %2F

my code

 interface Fq {
        @RequestLine(value = "GET /product/item")
        String getItemCoupon(@QueryMap Map map);
    }

public static void main(String... args) {
        Fq target = Feign.builder()
                .logger(new Slf4jLogger())
                .logLevel(Logger.Level.FULL)
                .target(Fq.class, "http://localhost");

        Map<String, Object> map = new HashMap<>();

        map.put("d", "1+1");
        map.put("e", "1/4");
        String itemCoupon = target.getItemCoupon(map);
}

result

20:37:38.541 [main] DEBUG feign.Logger - [Fq#getItemCoupon] ---> GET http://localhost/product/item?d=1%2B1&e=1%2F4 HTTP/1.1

may i has misunderstanding ? thinks

@kdavisk6 kdavisk6 added documentation Issues that require updates to our documentation help wanted Issues we need help with tackling labels Dec 23, 2019
@kdavisk6
Copy link
Member

That does appear to be incorrect. Encoding is consistent across the entire application. Please feel free to open a PR to correct if you have time.

kdavisk6 added a commit to kdavisk6/feign that referenced this issue Dec 30, 2019
Fixes OpenFeign#1131

Updating documentation around slahes to reflect that now encoding
is consistent across all areas and that `decodeSlash` is required
in all cases.
kdavisk6 added a commit that referenced this issue Dec 30, 2019
Fixes #1131

Updating documentation around slashes to reflect that now encoding
is consistent across all areas and that `decodeSlash` is required
in all cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues that require updates to our documentation help wanted Issues we need help with tackling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants