csharp-netcore: Add HttpClient support - #8328
Conversation
Pulling from source
merge from source
|
@devhl-labs thanks for this. What about adding the |
|
There is no interface on HttpClient so it's hard for me to imagine how to do that gracefully. Plus HttpClient is very versatile. Even in the RestSharp library people are asking for it to use HttpClient, though it doesn't look like it will happen. |
|
Also I'm guessing the changes I'm made would lead toward a mass rewrite, scrapping almost everything. That's why I put this pr here before I do such a thing. I doubt I'd migrate all the supported features since I only use a small subset. |
|
I saw the changes you made and we can easily support those via library option (which uses a new set of mustache templates) instead of using I'll file a PR to add the library option and we can merge this one into that one to continue the work. |
|
Oh like a set of mustache files for RestSharp and a whole other set for HttpClient? Yes that would be ideal as it wouldn't break for existing users. |
|
Right. I'll try to file the PR in the afternoon and keep you posted. |
|
And thanks for starting the work on this. Much appreciated. |
|
I'll merge this into the branch |
|
I've added the library option ( |
This is the beginning changes to move to HttpClient. It was working for my use case before I made the ApiException generic. At the moment it requires some post processing to replace ???? to ? and ??? to ?. This can be appended to the powershell script that begins the creation process in the first place. If this is good, then there is a lot of work to be done.
#6800
#5375
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,5.1.x,6.0.x