问题描述
我正在学习在 back4app 解析服务器上创建对象。我想通过休息而不使用 sdk 创建它。 官方网站上有 curl 和 python 文档,但没有用于 javascript。我现在正在使用 react native 我尝试使用 FETCH 和 AXIOS,但都没有工作(给出 401)错误 这是我正在尝试的
async function addCustomClassName(){
try{
axios({
method:'POST',url:'https://parseapi.back4app.com/classes/MyCustomClassName',Headers:{
"X-Parse-Application-Id": "the keys","X-Parse-REST-API-Key": "the keys","Content-Type": "application/json"
},data:{"myCustomKey1Name":"myCustomKey1Value","myCustomKey2Name":"myCustomKey2Value"}
}).then((res)=>{
console.log(res)
}).catch((err)=>{
console.log(err.request )
})
}
catch(error){
console.log(error)}}
身体能帮上忙吗? 感谢堆栈溢出的好人。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)