Skip to Main Content

BTD_Mod_Helper​.Api​.ModMenu​.ModHelperHttp


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.ModMenu

ModHelperHttp Class

Http client used by the mod helper

public class ModHelperHttp

Inheritance System.Object  ModHelperHttp

Properties

ModHelperHttp.Client Property

The HttpClient instance

public static System.Net.Http.HttpClient Client { get; set; }

Property Value

System.Net.Http.HttpClient

Methods

ModHelperHttp.DownloadFile(string, string) Method

Asynchronously downloads from a url to the given file path, returning whether the operation was successful

public static System.Threading.Tasks.Task<bool> DownloadFile(string url, string filePath);

Parameters

url System.String

URL to download from

filePath System.String

File path for the resulting file

Returns

System.Threading.Tasks.Task<System.Boolean>
Whether it was sucessful

ModHelperHttp.DownloadZip(string, string) Method

Downloads and extracts the contents of a zip file into the Zip Temp directory, returning the file paths
of the extracted files

public static System.Threading.Tasks.Task<System.IO.DirectoryInfo> DownloadZip(string url, string path=null);

Parameters

url System.String

URL to download from

path System.String

Path to unzip into, or null for using the zip temp directory

Returns

System.Threading.Tasks.Task<System.IO.DirectoryInfo>
Enumeration of extracted file paths, or null

ModHelperHttp.GetZip(string) Method

Downloads a zip file directly into a zip archive

public static System.Threading.Tasks.Task<System.IO.Compression.ZipArchive> GetZip(string url);

Parameters

url System.String

Returns

System.Threading.Tasks.Task<System.IO.Compression.ZipArchive>

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