The Firebase REST API describes how to write server values (currently only timestamps are supported) at a location, but it appears that one must submit a separate request in order to do this. Is there (or has there been planned) any way of setting timestamps (like createdAt) at the same time one submits other data? Seems like this would really help reduce traffic and improve performance.
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- adding sha1 in firebase app fails with error
- firebase storage cors strange Behaviour
相关文章
- How can make folder with Firebase Cloud Functions
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Firestore Update a document field Using Rest API
- How to convert a FCM token to APNS token?
- Global Exception Handling in Jersey & Spring?
- REST search interface and the idempotency of GET
- App not showing Notification receiving FCM when th
Sure, this is possible. The documentation is admittedly a little unclear, but all you need to do is include the
{".sv": "timestamp"}
object as part of your JSON payload. Here's an example that saves it to a keytimestamp
.curl -X PUT -d '{"something":"something", "timestamp":{".sv": "timestamp"}}' https://abc.firebaseio-demo.com/.json