我正在使用以下API:https://decapi.me/youtube/latest_video?id=UCFaV5im11vfhDs1BaaF9a0A,它获取用户的最新youtube视频,但它不是JSON格式,因此我不确定如何检索数据。我正在使用node-fetch
。
最佳答案
Decode content encoding (gzip/deflate) properly, and convert string output (such as res.text() and res.json()) to UTF-8 automatically.
尝试res.text()吗?
关于javascript - API不在Json中吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43126125/