Skip to content

Instantly share code, notes, and snippets.

Using http As New HttpClient()
Using resp = Await http.GetAsync(githubZipUrl)
If Not resp.IsSuccessStatusCode Then
Throw New Exception("Download failed: " & resp.StatusCode.ToString())
End If
Using fs As New FileStream(localZipPath, FileMode.Create, FileAccess.Write, FileShare.None)
Await resp.Content.CopyToAsync(fs)
End Using
End Using
End Using