0

当点击 API 以获取自述文件以在此处做出反应时:https://api.github.com/repos/facebook/react/readme

我不知道如何处理"content"字符串中的 base64 编码文本。

有谁知道怎么做?

4

1 回答 1

0

我猜你必须将 base64 解码为人类可读的格式。取决于您使用的语言,但在 javacript 中: atob(content)

从这里得到它:https ://scotch.io/tutorials/how-to-encode-and-decode-strings-with-base64-in-javascript

至于他们为什么发送base64编码的字符串,你可能会在这里找到一个原因:使用Base64编码有什么好处?

于 2017-02-19T01:36:54.390 回答