Firebase “Invalid data, couldn't parse JSON object…”

后端 未结 2 1340
余生分开走
余生分开走 2021-01-15 21:24

I\'m trying to make a POST request from Parse to Firebase, using Parse Cloud Code and Firebase\'s REST API.

Parse.Cloud.define(\"createChatRoom\", function(r         


        
相关标签:
2条回答
  • 2021-01-15 21:41

    I think it's better to use like this body: JSON.stringify({"hi": "hello"})

    0 讨论(0)
  • 2021-01-15 21:49

    Answering my question:

    JSON for Firebase must be wrapped in single quotes ':

    body: '{"hi": "hello"}'

    0 讨论(0)
提交回复
热议问题