Skip to Main Content

BTD_Mod_Helper​.Extensions​.HttpClientExtensions


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

HttpClientExtensions Class

Extensions for HttpClient

public static class HttpClientExtensions

Inheritance System.Object  HttpClientExtensions

Methods

HttpClientExtensions.GetBytesWithAuthAsync(this HttpClient, string, string, CancellationToken) Method

Version of System.Net.Http.HttpClient.GetByteArrayAsync(System.String,System.Threading.CancellationToken) that passes in an auth header value

public static System.Threading.Tasks.Task<byte[]> GetBytesWithAuthAsync(this System.Net.Http.HttpClient client, string requestUri, string auth=null, System.Threading.CancellationToken ct=default(System.Threading.CancellationToken));

Parameters

client System.Net.Http.HttpClient

requestUri System.String

auth System.String

ct System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<System.Byte[]>

HttpClientExtensions.GetStringWithAuthAsync(this HttpClient, string, string, CancellationToken) Method

Version of System.Net.Http.HttpClient.GetStringAsync(System.String,System.Threading.CancellationToken) that passes in an auth header value

public static System.Threading.Tasks.Task<string> GetStringWithAuthAsync(this System.Net.Http.HttpClient client, string requestUri, string auth=null, System.Threading.CancellationToken ct=default(System.Threading.CancellationToken));

Parameters

client System.Net.Http.HttpClient

requestUri System.String

auth System.String

ct System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task<System.String>

To learn how to download BTD Mod Helper and install mods, click here