-
Notifications
You must be signed in to change notification settings - Fork 755
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
Problem when creating a gist #337
Comments
I can see two issues with the snippet you posted:
Other than that you appear to be doing the same thing we do in the tests to create a gist, so it should work. |
@RaedsLab Any more thoughts here? |
I'm also getting an error, but it seems a 404 error: Here the code: var gh = new GitHub({ token: MY_TOKEN });
var gist = gh.getGist();
gist.create({
public: true,
description: 'My first gist',
files: {
"file1.txt": {
contents: "Aren't gists great!"
}
}
}) The lib is posting this:
And the response is:
|
@guumaster Are you sure your token has the |
sure, I'm using it with raw ajax calls and it works. |
@guumaster @RaedsLab This is probably due to a mistake in the example from the readme reported in #374. Can you try with:
|
This issue has been fixed, so I'm closing it. |
Following the documentation, when I try to create a gist in the browser using the following code:
This returns an error
POST https://api.github.com/gists 422 (Unprocessable Entity)
Can you reproduce? Any idea why?
The text was updated successfully, but these errors were encountered: