-
Notifications
You must be signed in to change notification settings - Fork 492
Conversation
|
||
String Firebase::sendRequestGetBody(const char* method, const String& path, const String& value) { | ||
sendRequest(method, path, value); | ||
if (_error.code() != 0) { | ||
return ""; | ||
} | ||
// no _http.end() because of connection reuse. | ||
return _http.getString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of splitting sendRequest
and getBody
functions? that way we can compose them more explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. We will continue discussion of higher level refactoring in the other PR.
return getBody(); | ||
} | ||
|
||
bool Firebase::remove(const String& path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I feel like we should return void
here, to stay inline with the current way we have to check for error with error()
.
LGTM: just some nits. |
firebase: void return for send request and inline checkResponse
Tested on esp8266 feather huzzah. |
Soliving issue #18