Skip to content

Commit

Permalink
Add httpupdate lib import in ota example (#8667)
Browse files Browse the repository at this point in the history
Docs doesn't include any reference to include <ESP8266httpUpdate.h> library in Advanced OTA Updater section. It took me some time to find out while reading the docs
  • Loading branch information
amjed-ali-k committed Dec 14, 2022
1 parent 8e79833 commit 9cd560b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/ota_updates/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ Simple updater downloads the file every time the function is called.

.. code:: cpp
#include <ESP8266httpUpdate.h>
WiFiClient client;
ESPhttpUpdate.update(client, "192.168.0.2", 80, "/arduino.bin");
Expand All @@ -535,6 +537,8 @@ The server-side script can respond as follows: - response code 200, and send the

.. code:: cpp
#include <ESP8266httpUpdate.h>
WiFiClient client;
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
switch(ret) {
Expand Down

0 comments on commit 9cd560b

Please sign in to comment.