mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-10-23 16:14:11 +00:00
15 lines
574 B
C#
15 lines
574 B
C#
namespace Lantean.QBitTorrentClient
|
|
{
|
|
internal static class HttpClientExtensions
|
|
{
|
|
public static Task<HttpResponseMessage> PostAsync(this HttpClient httpClient, string requestUrl, FormUrlEncodedBuilder builder)
|
|
{
|
|
return httpClient.PostAsync(requestUrl, builder.ToFormUrlEncodedContent());
|
|
}
|
|
|
|
public static Task<HttpResponseMessage> GetAsync(this HttpClient httpClient, string requestUrl, QueryBuilder builder)
|
|
{
|
|
return httpClient.GetAsync($"{requestUrl}{builder.ToQueryString()}");
|
|
}
|
|
}
|
|
} |