[java][webclient] remove default Content-Type#7945
[java][webclient] remove default Content-Type#7945wing328 merged 1 commit intoOpenAPITools:masterfrom
Conversation
|
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
|
Can someone help me resolve the circleci build issue? It just ends with |
|
Just restarted the CI build. Let's see how that goes. |
|
@druppelt How to generate client without content type for GET method? In version 5.0.1, it will still get the old version. |
|
@labamba63 What exactly is not working for you? I created a simple Spring project, generated the client with the codegen and the typical petstore swagger and called a mockservice running locally. According to the log, the Content-Type Header was not sent: The plugin config in the pom: The api call: |
|
Now we only need this fix for the rest template |
|
@eratio08 I wonder if you can file a PR for that when you've time. Thanks. |
As lorenzleutgeb reported in #476 two years ago, GET requests get a Content-Type header by default, which is wrong. And while it shouldn't, it can actually lead to issues with some servers. This PR changes that for java webclient.
I only changed it for webclient as that is what I use and I was hoping that keeping the PR small would result in a faster merge. If needed for consistency I could also fix the other java clients.
PR checklist
./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.master@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01)