Tag: octokit.net

无法在Octokit.net中将存储库内容作为.zip文件(zipball)获取

我使用Octokit.net version 0.9.0 (GitHub API for .NET)获取少量存储库的zip内容。 我已经有了我需要的存储库列表但是我无法将存储库的内容作为.zip文件(称为zipball)获取 到目前为止我尝试过的 // … client = new Client(…); // some authentication logic… // some other queries to GitHub that work correctly var url = “https://api.github.com/repos/SomeUser/SomeRepo/zipball”; var response = await this.client.Connection.Get( new Uri(url), new Dictionary(), null); var data = response.Body; var responseData = response.HttpResponse.Body; 我尝试的问题 data为空 responseData.GetType().Name表示responseData的类型为string 当我尝试Encoding.ASCII.GetBytes(response.HttpResponse.Body.ToString()); 我得到无效的zip文件 […]