Skip to content

Instantly share code, notes, and snippets.

@dphiffer
Created March 2, 2016 17:20
Show Gist options
  • Select an option

  • Save dphiffer/ac88021340f004097bfc to your computer and use it in GitHub Desktop.

Select an option

Save dphiffer/ac88021340f004097bfc to your computer and use it in GitHub Desktop.
How do I GitHub API?
curl -X POST \
-H "User-Agent: curl" \
-H "Content-Type: application/json" \
-H "Authorization: token XXXXXX" \
"https://api.github.com/gists" -d '
{
"description": "Testing gist API",
"public": false,
"files": {
"file1.txt": {
"content": "Hello, testing one two."
}
}
}
'
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment