Move Old HttpWebRequest to HttpClient Instance#178
Conversation
Release 1.1.0 | Plugin 1.1.0 | Explorer Plugin 1.1.0
Release 1.1.1
Release 1.1.2
Release 1.2.0 | Plugin 1.2.0
Release 1.2.1
# Conflicts: # Flow.Launcher.Infrastructure/Http/Http.cs # Plugins/Flow.Launcher.Plugin.PluginManagement/Main.cs
… setting won't update automatically without action
…e doing Http request
|
Seems that Fody provides easy an injection for IPropertyChanged, which is included in Flow........but anyway, since I have written it, just leave it there..... |
… into UpdateHttpMaster
2. Manually replace "#" with "%23" to solve the similar issue in Explorer plugin 3. Add GetAsync method with Uri as argument 4. Remove unused encoding argument 5. Change exception type for WebSearch Plguin 6. Update Comment
…or await in checking update
|
|
||
| public static async Task Download([NotNull] string url, [NotNull] string filePath) | ||
| { | ||
| using var response = await client.GetAsync(url); |
There was a problem hiding this comment.
client.GetAsync crashes the entire app for me when i try to install plugin. Cant see any reason why though, no exception is thrown
There was a problem hiding this comment.
Oh that's because before the Http.Download is not async, so no await is added there.
Fix it, and the previous one. Forget to commit seperately, so both is on last commit. @jjw24 |
|
Hold on, update also call the method Http.Download so need to change that as well. |
|
|
|
Done, please review. @jjw24 |
| try | ||
| { | ||
| const string api = "http://suggestion.baidu.com/su?json=1&wd="; | ||
| result = await Http.Get(api + Uri.EscapeUriString(query), "GB2312"); |
There was a problem hiding this comment.
removal of "GB2312" is intentional?
There was a problem hiding this comment.
Yes, I have checked, the ReadAsString doesn't need the encoding to create the result.
|
good work |
|
for reference on why use ConfigureAwait(false) |


This pull request changes the Get & Download method implementation in Flow.Launcher.Infrastructure.Http by moving the old HttpWebRequest API to new HttpClient.
This has fixed my issue of connection to Github while checking for new Update.