Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting zipball with Octokit is returning me null or invalid zip file #784

Closed
NikolayIT opened this issue Apr 21, 2015 · 1 comment
Closed

Comments

@NikolayIT
Copy link

I have the following code:

// ... client = new Client(...);
// some authentication logic...
// some other queries to GitHub that work correctly
var url = "https://api.github.com/repos/SomeOrg/SomePrivateRepo/zipball";
var response = await this.client.Connection.Get<byte[]>(new Uri(url),
                                                        new Dictionary<string, string>(),
                                                        null);
var data = response.Body;
var responseData = response.HttpResponse.Body;

Three problems:

  1. data is null
  2. responseData is of type string
  3. when I try Encoding.ASCII.GetBytes(response.HttpResponse.Body.ToString()); I get invalid zip file

untitled

Am I doing something wrong or is it a bug?

@shiftkey
Copy link
Member

Fixed in #792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants