Allow to customize encoding process of path params
See original GitHub issueCurrently Encoder is applied only for @RequestBody
params. What about @RequestParam
?
I know this is special case but we have lot of working legacy code. For current solution this objects are serialized using Jackson (we use @JsonValue
) but Feign uses simple toString()
.
Possible solutions:
- invoke
Encoder
for all parameter types - use Jackson to serialize object
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to force URIBuilder.path(...) to encode parameters like ...
When a parameter contains the character "%" followed by two characters that together form an URL-encoded character, the "%" is not encoded as...
Read more >URL Encoding Path and Query Parameters
If path or query parameters contain characters that are either reserved or potentially unsafe when used in URLs, those characters must be URL...
Read more >Path Parameters - FastAPI
You can declare path "parameters" or "variables" with the same syntax used by Python format strings: from fastapi import FastAPI app = FastAPI() ......
Read more >encodeURIComponent() - JavaScript - MDN Web Docs
The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape ...
Read more >Chapter 14. @Encoded and encoding - JBoss.org
JAX-RS allows you to get encoded or decoded @*Params and specify path definitions and parameter names using encoded or decoded strings. The @javax.ws.rs....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is not the forum to discuss FeignFormatterRegistrar and other spring cloud Netflix things
If you use @FeignClient and Spring Cloud Netflix you can use org.springframework.cloud.netflix.feign.FeignFormatterRegistrar. You should create a bean in client’s configuration:
In registerFormatters() method you have access to object of FormatterRegistry. If you look inside the FormatterRegistry class, you will see a method:
This is a method that will let you to associate specific class with a printer (for building a string from an object) and parser (for building an object from a string).