Skip to content

Commit cfa93a2

Browse files
committed
Add GetStreamAsync method
1 parent 7dc66ea commit cfa93a2

File tree

1 file changed

+7
-0
lines changed
  • Flow.Launcher.Infrastructure/Http

1 file changed

+7
-0
lines changed

Flow.Launcher.Infrastructure/Http/Http.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,12 @@ public static async Task<string> Get([NotNull] string url, string encoding = "UT
110110
$"Error code <{response.StatusCode}> with content <{content}> returned from <{url}>");
111111
}
112112
}
113+
114+
public static async Task<Stream> GetStreamAsync([NotNull] string url)
115+
{
116+
Log.Debug($"|Http.Get|Url <{url}>");
117+
var response = await client.GetAsync(url);
118+
return await response.Content.ReadAsStreamAsync();
119+
}
113120
}
114121
}

0 commit comments

Comments
 (0)