0
我在Babel中很新,並試圖將標題爲「Content-Type」的POST請求設置爲「application/json」。是否有更改Request
的標題的文檔?在Babel中更改請求的默認標頭
import Request from 'request-promise-native'
const result = await Request
.post(`some url`)
.auth(authId, secretToken,false)
.form({
text: "hello"
})
console.log(result);
return JSON.parse(result)
是什麼'Request'必須做的巴貝爾transpiler? – Bergi