json - Github API 更新文件时返回 404
问题描述
我正在尝试使用 roblox 的 HTTPService 更新 github 上的 JSON 文件。每当我发送 put 请求时,github 都会返回 404 状态。我制作了一个程序来更新python中的文件,它工作正常,但事实并非如此。
local data = {
message = "Did stuff",
committer = {
name = <name>,
email = <email>
},
content = b64enc("{Song : "..song..", IsBroadcast = true"),
sha = <sha>
}
local response = httpservice:RequestAsync(
{
Url = <github api url>,
Method = "PUT",
Headers = {
["auth"] = "<authorization>",
["Content-Type"] = "application/json",
},
Body = httpservice:JSONEncode(data)
}
)
解决方案
推荐阅读
- windows - 如何通过批处理文件移动文件但如果文件已经存在移动到其他地方?
- javascript - HTML 视频右键上下文菜单 - 仅隐藏循环和显示控件
- regex - AWK 将任务列表中的字符串日期值与今天的日期进行比较
- javascript - 在 javascript 中使用正则表达式格式化输入文本
- javascript - 获取从 firebase firestore 返回的文档中的特定字段
- bash - 如何通过命名管道暂停mplayer后继续?
- java - 尝试调用虚方法 [空对象引用]
- graph - 使用 graphviz 创建谱系图布局
- c++ - 如何忽略字符串中的第一个逗号,以便 getline 获取完整的字符串
- python - 在统计处理的 R2 值上使用“groupby”-python