OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.37k stars 1.91k forks source link

Take ProxyMethod's "argv" into RequestTemplate #2445

Open rimwoorim opened 1 month ago

rimwoorim commented 1 month ago

Hello, BIG_OLD, :)

i want to visit the original argv of the service func, which is decribe by @FeignClient, @RequestMapping

it can help me such like calculting a new Host Address

maybe i can parse from the RequestTemplate too, but i think it's boring and complex.

so, i hope that, you can take it into RequestTemplate as a field when you create it. (i want do it myself, but i can, cause some class is final class, and also not exists a direct position to handle it).

And then, i can use it with MethodMetadata for more magical operation.

the position i found : SynchronousMethodHandler.java - Line 65.

RequestTemplate template = buildTemplateFromArgs.create(argv); 

go into the #create(argv), it just put the argv's item to what it want, and never save it.

that's all. Thank you. Dear BIG_OLD.