Replies: 2 comments 2 replies
-
|
The Firebase Realtime database REST API requires the JSON representation string as the payload for HTTP PATCH aka update function in this library. You can directly set JSON representation string to // {"value":12345}}
object_t json("{\"value\":12345}");
bool status = Database.update(aClient, "/path/to/data", json); |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I also wanted to ask you, how do I set the session duration so as not to repeat the handshaking and other parameters with each send? What is the maximum limit? I need to reduce the data sent (if they occur) to 1-2 minutes as much as possible. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I wanted to avoid using object_t json; JsonWriter writer; writer.create to send a single value to the database and take advantage of this to streamline the sketch.
I noticed that if I send using "set"
Database.set(aClient, USER_UID "/notif", "low");
I can send, but with slightly higher bandwidth consumption than update.
However, if I do directly
Database.update(aClient, USER_UID "/notif", "low");
the data is not received in the database.
I wanted to ask: does database update only support sending with json? Or does it also support etc?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions