简体   繁体   English

如何使用api通过http get请求访问Firebase数据库数据

[英]How to access Firebase database data through http get request by using api

I have been save and retrieve data from Firebase now I want to Get data from firebase database through API and I want to post data in firebase database by using HTTP post request. 我一直在从Firebase中保存和检索数据,现在我想通过API从Firebase数据库中获取数据,并且想通过使用HTTP发布请求将数据发布到Firebase数据库中。 Which API do I use for getting firebase database data through API in form of JSON? 我该使用哪个API通过JSON形式通过API获取Firebase数据库数据?

Installation & Setup for REST API I read this link but still confused, please help me. REST API的安装和设置我阅读了此链接,但仍然感到困惑,请帮助我。 I save this data in firebase database now I should use this data through API in my App. 我现在将这些数据保存在firebase数据库中,我应该通过我的App中的API使用这些数据。 Thanks in Advance 提前致谢

You are linking to the old Firebase docs you might find these docs a little easier to read and understand. 您正在链接到旧的Firebase文档,您可能会发现这些文档更容易阅读和理解。 An example 一个例子

curl -X PUT -d '{
  "alanisawesome": {
    "name": "Alan Turing",
    "birthday": "June 23, 1912"
  }
}' 'https://docs-examples.firebaseio.com/rest/saving-data/fireblog/users.json'

Result in the Database 数据库结果

{
  "users": {
    "alanisawesome": {
      "date_of_birth": "June 23, 1912",
      "full_name": "Alan Turing"
    }
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM