-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Replace Webclient with HttpClient #18995
Conversation
Depends on #18955 removing our dependency on my minimal mono repack (which doesn't have HttpClient). |
b8a81db
to
a063499
Compare
Can you be a bit more elaborate on the upside of this change? |
First of all its not recommended to use |
9bd8d2f
to
1d0457f
Compare
1d0457f
to
8ca91d1
Compare
Needs a rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of my comments are naming or stylistic nitpicking. From what I tested only the news download in MainMenuLogic
isn't working and I left a comment on what is missing.
I still do not understand why HttpClientFactory
(or its consumers?) isn't caching anything, though, since I was left with the impression that it might be a good idea to reuse one or more instances of HttpClient
instead of creating a new one for every request. Please elaborate.
OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackageLogic.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackageLogic.cs
Outdated
Show resolved
Hide resolved
ae75ded
to
ab2b21c
Compare
updated and rebased. |
ab2b21c
to
987845c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and I couldn't spot regressions. 👍
987845c
to
842fe0f
Compare
updated. |
builder.Append("?"); | ||
|
||
foreach (var parameter in parameters) | ||
builder.Append($"{parameter.Name}={parameter.Value}&"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this leave a stray &
at the end of the query string?
Do we care?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW it doesn't seem to hurt 🤷
OpenRA.Mods.Common/Traits/BotModules/BotModuleLogic/BaseBuilderQueueManager.cs
Outdated
Show resolved
Hide resolved
842fe0f
to
9ee797a
Compare
Updated. |
No description provided.