Skip to content

Read-me.md mybe wrong ? #1131

@switchYello

Description

@switchYello
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssues that require updates to our documentationhelp wantedIssues we need help with tackling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions