Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7561f36

Browse files
committed
firebase: add set
1 parent18deb49 commit7561f36

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎Firebase.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ void Firebase::remove(const String& path) {
4141
sendRequest("DELETE", path);
4242
}
4343

44+
StringFirebase::set(const String& path,const String& value) {
45+
sendRequest("PUT", path, value);
46+
returnreadBody();
47+
}
48+
4449
Firebase&Firebase::stream(const String& path) {
4550
_error.reset();
4651
String url =makeURL(path);

‎Firebase.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class Firebase {
5151
return _error;
5252
}
5353
Stringget(const String& path);
54+
// write a new JSON `value` to the given `path`.
55+
// Note: A String `value` must include double quotes to be valid json.
56+
Stringset(const String& path,const String& value);
57+
// append a new JSON `value` to the given `path`.
58+
// Note: A String `value` must include double quotes to be valid json.
5459
Stringpush(const String& path,const String& value);
5560
voidremove(const String& path);
5661
boolconnected();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp