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
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

FirebaseArduino: switch to ArduinoHttpClient#353

Open
proppy wants to merge1 commit intoFirebaseExtended:master
base:master
Choose a base branch
Loading
fromproppy:arduino-http-client

Conversation

@proppy
Copy link
Contributor

@proppyproppy commentedJun 15, 2018
edited
Loading

Preliminary work to port the library to useArduinoHttpClient.
This will enable the library to be portable across arduino cores implementing theClient Interface.

  • ✔️ compile for esp8266
  • ✔️ compile for esp32
  • ✔️ CRUD tested on esp8266
  • ✔️ CRUD tested on esp32
  • ⚠️ streaming not tested on esp8266
  • ⚠️ streaming not tested on esp32

Note this breaks the following libraries/sketches:

  • FirebaseCloudMessaging
  • contrib/modem
  • contrib/things

And obsolete the following classes:

  • Firebase
  • FirebaseHttpClient

Testing welcome 🎠

Related#344#220

/cc@ed7coyne@kotl

This allow the library to be portable across arduino core implementingthe Client Interface.FixesFirebaseExtended#344
@kotl
Copy link
Collaborator

You may remember this, but I wanted to remind you that for ESP8266 implementation, please be extra careful about our use of workaround for ESP8266 of modifying _canReuse even after it was set to false in

https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp#L1020

Through these lines:
if(headerName.equalsIgnoreCase("Connection")) {
_canReuse = headerValue.equalsIgnoreCase("keep-alive");
}
(Since RTDB tends to not send "keep-alive" value)

We change _canReuse value early enough, so that before HTTPClient::end is called, it is set to true.
However, we can't override HTTPClient::end() since it's not virtual and luckily for us, we never call HTTPClient::end, and it is also not called in HTTPClient implementation, therefore when we call ForceReuseHTTPClient::end, it works.

We will need to have same workaround for ESP8266 implementation using ArduinoHttpClient if RTDB is still acting in the same way.

@proppy
Copy link
ContributorAuthor

proppy commentedJun 21, 2018
edited
Loading

@kotl Oh right, I forgot about this!

We're lucky as It seems thatArduinoHttpClient header handling doesn't parse "Connection: close":
https://github.com/arduino-libraries/ArduinoHttpClient/blob/master/src/HttpClient.cpp#L763

@proppy
Copy link
ContributorAuthor

@kotl did you give it a try?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@proppy@kotl

[8]ページ先頭

©2009-2025 Movatter.jp