【发布时间】:2022-01-09 13:32:02
【问题描述】:
我收到以下错误:
Error: 13 INTERNAL: Request message serialization failure: invalid encoding
当我尝试运行此 axios 帖子时。有什么想法有什么问题吗? (我尝试了许多不同的版本,但错误不是那么具体)
使用 Firebase 函数中的 Axios 在 Node.js 上运行它。
const result = await axios.post('https://example_api_url.com', {
data1: "data1",
data2: "data2,
}, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}});
【问题讨论】:
-
你有一个错字,应该是“data2”
标签: node.js firebase axios google-cloud-functions