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

Commit102c84b

Browse files
committed
Split sendRequestGetBody to GetBody
1 parent9985342 commit102c84b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎Firebase.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ Firebase& Firebase::auth(const String& auth) {
2828
}
2929

3030
StringFirebase::get(const String& path) {
31-
returnsendRequestGetBody("GET", path);
31+
sendRequest("GET", path);
32+
returngetBody();
3233
}
3334

3435
StringFirebase::push(const String& path,const String& value) {
35-
returnsendRequestGetBody("POST", path, value);
36+
sendRequest("POST", path, value);
37+
returngetBody();
3638
}
3739

3840
boolFirebase::remove(const String& path) {
@@ -87,8 +89,7 @@ int Firebase::sendRequest(const char* method, const String& path, const String&
8789
return statusCode;
8890
}
8991

90-
StringFirebase::sendRequestGetBody(constchar* method,const String& path,const String& value) {
91-
sendRequest(method, path, value);
92+
StringFirebase::getBody() {
9293
if (_error.code() !=0) {
9394
return"";
9495
}

‎Firebase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Firebase {
6565
private:
6666
StringmakeURL(const String& path);
6767
intsendRequest(constchar* method,const String& path,const String& value ="");
68-
StringsendRequestGetBody(constchar* method,const String& path,const String& value ="");
68+
StringgetBody();
6969
voidcheckResponse(constchar* method,const String& url,int status_code);
7070

7171
HTTPClient _http;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp