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

Can't set request header in json format #2252

Open
hyfsy opened this issue Nov 30, 2023 · 5 comments
Open

Can't set request header in json format #2252

hyfsy opened this issue Nov 30, 2023 · 5 comments

Comments

@hyfsy
Copy link

hyfsy commented Nov 30, 2023

image

@hyfsy
Copy link
Author

hyfsy commented Nov 30, 2023

spring-cloud-starter-openfeign: 3.1.4
feign-core: 11.8

@lquterqtd
Copy link

lquterqtd commented Dec 7, 2023

{"a":"b""c"}
这不是一个合法的json格式吧?
试试{"a":"b""c"}
以{开始的header,feign会认为是表达式,会按照
https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.2
的规则处理的

@hyfsy
Copy link
Author

hyfsy commented Dec 8, 2023

Regardless of whether the json format is correct or not, the example I gave above already shows that the header has been parsed as the wrong string, my problem is that the header should support json format, and should not be parsed as a template even if it has {}. In addition, the link you gave is the URI Template specification, not the HTTP Header specification which is showed here: https://datatracker.ietf.org/doc/html/rfc2616#section-4.2

@raizoor
Copy link

raizoor commented Dec 13, 2023

@hyfsy

Please see that -> #1987

It seems the same problem..

@hyfsy
Copy link
Author

hyfsy commented Dec 14, 2023

It's the same problem, but it hasn't been solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants