Add Http.Get and Http.GetAsync to IPublicAPI

This commit is contained in:
弘韬 张 2021-01-08 16:00:06 +08:00
parent a8e4c504d0
commit 4f35e62161
2 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,9 @@
using Flow.Launcher.Plugin.SharedModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Flow.Launcher.Plugin
{
@ -90,6 +93,10 @@ namespace Flow.Launcher.Plugin
/// </summary>
event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
public MatchResult FuzzySearch(string query, string stringToCompare);
MatchResult FuzzySearch(string query, string stringToCompare);
Task<string> HttpGetStringAsync(string url, CancellationToken token = default);
Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default);
}
}

View file

@ -15,6 +15,8 @@ using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Plugin;
using Flow.Launcher.ViewModel;
using Flow.Launcher.Plugin.SharedModel;
using System.Threading;
using System.IO;
namespace Flow.Launcher
{
@ -135,6 +137,16 @@ namespace Flow.Launcher
public MatchResult FuzzySearch(string query, string stringToCompare) => StringMatcher.FuzzySearch(query, stringToCompare);
public Task<string> HttpGetStringAsync(string url, CancellationToken token = default)
{
return null;
}
public Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default)
{
return null;
}
#endregion
#region Private Methods