JavaScript を使用してパブリック Gist を作成しようとしています。私は認証を使用していません - これはすべてクライアント側です。
var gist = {
"description": "test",
"public": true,
"files": {
"test.txt": {
"content": "contents"
}
}
};
$.post('https://api.github.com/gists', gist, function(data) {
});
上記のコードは 400: Bad Request - Problems parseing JSON をスローします。ただし、私の JSON は有効です。何か案は?