5
我正在尝试通过javascript创建公开要点。我没有使用任何身份验证 - 这是所有客户端。无法发布到github v3 API
var gist = {
"description": "test",
"public": true,
"files": {
"test.txt": {
"content": "contents"
}
}
};
$.post('https://api.github.com/gists', gist, function(data) {
});
上述代码抛出400:错误的请求 - 解析JSON的问题。不过,我的JSON是有效的。有任何想法吗?
你是从一个网站做到这一点。有可能的跨站点问题。 – MitMaro 2012-03-23 05:09:06
大概应该说浏览器,而不是网站。 – MitMaro 2012-03-23 05:12:30
有点像http://groups.google.com/group/helma/browse_thread/thread/3a89ec84a2815338,你检查了编码吗? – VonC 2012-03-23 05:14:54