Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Added remove() method. #40

Merged
merged 5 commits into from
Jan 20, 2016
Merged

Added remove() method. #40

merged 5 commits into from
Jan 20, 2016

Conversation

ed7coyne
Copy link
Collaborator

Soliving issue #18


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();
Copy link
Contributor

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.

Copy link
Collaborator Author

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) {
Copy link
Contributor

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().

@proppy
Copy link
Contributor

proppy commented Jan 20, 2016

LGTM: just some nits.

firebase: void return for send request and inline checkResponse
@proppy
Copy link
Contributor

proppy commented Jan 20, 2016

Tested on esp8266 feather huzzah.

proppy added a commit that referenced this pull request Jan 20, 2016
@proppy proppy merged commit 18deb49 into FirebaseExtended:master Jan 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants