forked from khoih-prog/AsyncHTTPRequest_Generic
v1.9.0 to fix bug and optimize code
### Releases v1.9.0 1. Fix long timeout if using `IPAddress`. Check [setTimeout() hasn't any effect #38](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/38) 2. Optimize code 3. Display only successful responseText in examples 4. Improve debug messages by adding functions to display error messages instead of `cryptic error number` 5. Remove support to STM32 using **LAN8720** due to problem with new STM32 core v2.3.0 5. Update `Packages' Patches`
This commit is contained in:
@@ -46,11 +46,11 @@
|
||||
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.12.1"
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1012001
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.13.0"
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1013000
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.7.0"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1007000
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.0"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009000
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
@@ -556,17 +556,21 @@ void sendRequest()
|
||||
}
|
||||
}
|
||||
|
||||
void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState)
|
||||
void requestCB(void *optParm, AsyncHTTPRequest *request, int readyState)
|
||||
{
|
||||
(void) optParm;
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
Serial.println(F("\n**************************************"));
|
||||
Serial.println(request->responseText());
|
||||
Serial.println(F("**************************************"));
|
||||
|
||||
request->setDebug(false);
|
||||
AHTTP_LOGDEBUG(F("\n**************************************"));
|
||||
AHTTP_LOGDEBUG1(F("Response Code = "), request->responseHTTPString());
|
||||
|
||||
if (request->responseHTTPcode() == 200)
|
||||
{
|
||||
Serial.println(F("\n**************************************"));
|
||||
Serial.println(request->responseText());
|
||||
Serial.println(F("**************************************"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,7 +578,7 @@ void setup()
|
||||
{
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
while (!Serial);
|
||||
while (!Serial && millis() < 5000);
|
||||
|
||||
delay(200);
|
||||
|
||||
@@ -634,7 +638,7 @@ void setup()
|
||||
#if ( USING_ESP32_S2 || USING_ESP32_C3 )
|
||||
ESPAsync_WiFiManager ESPAsync_wifiManager(&webServer, NULL, "AutoConnectAP");
|
||||
#else
|
||||
DNSServer dnsServer;
|
||||
AsyncDNSServer dnsServer;
|
||||
|
||||
ESPAsync_WiFiManager ESPAsync_wifiManager(&webServer, &dnsServer, "AutoConnectAP");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user