【发布时间】:2020-04-05 08:23:02
【问题描述】:
https://developer.github.com/enterprise/2.18/v3/repos/contents/#create-or-update-a-file
我正在尝试使用 github-api 库调用上述 API。 API 失败,出现 422,Base 64 编码无效。
该库使用MIME 类型编码。如果我改成Base64.encodeToString(content),github api就会接受。
我的问题是:
- github 不接受 MIME 类型 64 编码吗?
- 我需要添加某种标题来说明它不是 plain 64 而是 MIME 类型(分成 76 个字符的块)?
【问题讨论】:
标签: github mime-types github-api mime