mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
Rename ESP8266httpClient to ESP8266HTTPClient (part 1)
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266WiFiMulti.h>
|
||||
|
||||
#include <ESP8266httpClient.h>
|
||||
#include <ESP8266HTTPClient.h>
|
||||
#include <ESP8266httpUpdate.h>
|
||||
|
||||
#define USE_SERIAL Serial
|
||||
|
@ -41,7 +41,7 @@ ESP8266HTTPUpdate::~ESP8266HTTPUpdate(void) {
|
||||
* @return t_httpUpdate_return
|
||||
*/
|
||||
t_httpUpdate_return ESP8266HTTPUpdate::update(const char * url, const char * current_version, const char * httpsFingerprint) {
|
||||
httpClient http;
|
||||
HTTPClient http;
|
||||
http.begin(url, httpsFingerprint);
|
||||
return handleUpdate(&http, current_version);
|
||||
}
|
||||
@ -56,24 +56,24 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * url, const char * cur
|
||||
* @return
|
||||
*/
|
||||
t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port, const char * url, const char * current_version, bool https, const char * httpsFingerprint) {
|
||||
httpClient http;
|
||||
HTTPClient http;
|
||||
http.begin(host, port, url, https, httpsFingerprint);
|
||||
return handleUpdate(&http, current_version);
|
||||
}
|
||||
|
||||
t_httpUpdate_return ESP8266HTTPUpdate::update(String host, uint16_t port, String url, String current_version, bool https, String httpsFingerprint) {
|
||||
httpClient http;
|
||||
HTTPClient http;
|
||||
http.begin(host, port, url, https, httpsFingerprint);
|
||||
return handleUpdate(&http, current_version.c_str());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param http httpClient *
|
||||
* @param http HTTPClient *
|
||||
* @param current_version const char *
|
||||
* @return t_httpUpdate_return
|
||||
*/
|
||||
t_httpUpdate_return ESP8266HTTPUpdate::handleUpdate(httpClient * http, const char * current_version) {
|
||||
t_httpUpdate_return ESP8266HTTPUpdate::handleUpdate(HTTPClient * http, const char * current_version) {
|
||||
|
||||
t_httpUpdate_return ret = HTTP_UPDATE_FAILED;
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <WiFiUdp.h>
|
||||
#include <ESP8266httpClient.h>
|
||||
#include <ESP8266HTTPClient.h>
|
||||
|
||||
//#define DEBUG_HTTP_UPDATE(...) Serial1.printf( __VA_ARGS__ )
|
||||
|
||||
@ -54,7 +54,7 @@ class ESP8266HTTPUpdate {
|
||||
t_httpUpdate_return update(String host, uint16_t port, String url = "/", String current_version = "", bool https = false, String httpsFingerprint = "");
|
||||
|
||||
protected:
|
||||
t_httpUpdate_return handleUpdate(httpClient * http, const char * current_version);
|
||||
t_httpUpdate_return handleUpdate(HTTPClient * http, const char * current_version);
|
||||
bool runUpdate(Stream& in, uint32_t size, String md5);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user