Need to download a zipball from given link in C#
YES! I searched the net and stackoverflow and been trying to accomplish this seemingly impossible task for hours...
Ironically, in Curl it's single line and works like charm..
curl -L https://api.github.com/repos/username/reponame/zipball > repo.zip
I want to do in C# same thing curl does above...
Tried WebClient.DownloadFile()
Gives
forbidden (403)
Tried async method too Gives
0 bye file (no error/exception)
Tried HttpClient Datadownload and File stream writer, give same errors as above. Seams like streamwirter is not invoked at all so it's failing to access the server that's the main part of my problem
I have Octokit.NET installed but it lacks documentation so I'm not even sure where to start doing this (probably it's WebClient version but I did try that in .NET libs)
Found this answer but didn't really understand it (Cannot get repository contents as .zip file (zipball) in Octokit.net)
Even tried to run .sh script in C# but it gives me exception that it can't run this kind of shell on this OS