1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Add httpupdate lib import in ota example (#8667)

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
This commit is contained in:
Amju 2022-12-14 16:37:41 +05:30 committed by GitHub
parent 8e79833db6
commit 9cd560b451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -523,6 +523,8 @@ Simple updater downloads the file every time the function is called.
.. code:: cpp .. code:: cpp
#include <ESP8266httpUpdate.h>
WiFiClient client; WiFiClient client;
ESPhttpUpdate.update(client, "192.168.0.2", 80, "/arduino.bin"); ESPhttpUpdate.update(client, "192.168.0.2", 80, "/arduino.bin");
@ -535,6 +537,8 @@ The server-side script can respond as follows: - response code 200, and send the
.. code:: cpp .. code:: cpp
#include <ESP8266httpUpdate.h>
WiFiClient client; WiFiClient client;
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here"); t_httpUpdate_return ret = ESPhttpUpdate.update(client, "192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
switch(ret) { switch(ret) {