mirror of
https://github.com/khoih-prog/AsyncHTTPRequest_Generic.git
synced 2025-07-29 18:07:15 +02:00
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:
@ -126,9 +126,19 @@ void requestCB0(void* optParm, AsyncHTTPRequest* thisRequest, int readyState)
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
Serial.println("\n**************************************");
|
||||
Serial.println(thisRequest->responseText());
|
||||
Serial.println("**************************************");
|
||||
AHTTP_LOGERROR(F("\n**************************************"));
|
||||
AHTTP_LOGERROR1(F("Response Code = "), request->responseHTTPString());
|
||||
|
||||
if (request->responseHTTPcode() == 200)
|
||||
{
|
||||
Serial.println(F("\n**************************************"));
|
||||
Serial.println(request->responseText());
|
||||
Serial.println(F("**************************************"));
|
||||
}
|
||||
else
|
||||
{
|
||||
AHTTP_LOGERROR(F("Response error"));
|
||||
}
|
||||
|
||||
thisRequest->setDebug(false);
|
||||
readySend[0] = true;
|
||||
@ -141,9 +151,19 @@ void requestCB1(void* optParm, AsyncHTTPRequest* thisRequest, int readyState)
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
Serial.println("\n**************************************");
|
||||
Serial.println(thisRequest->responseText());
|
||||
Serial.println("**************************************");
|
||||
AHTTP_LOGERROR(F("\n**************************************"));
|
||||
AHTTP_LOGERROR1(F("Response Code = "), request->responseHTTPString());
|
||||
|
||||
if (request->responseHTTPcode() == 200)
|
||||
{
|
||||
Serial.println(F("\n**************************************"));
|
||||
Serial.println(request->responseText());
|
||||
Serial.println(F("**************************************"));
|
||||
}
|
||||
else
|
||||
{
|
||||
AHTTP_LOGERROR(F("Response error"));
|
||||
}
|
||||
|
||||
thisRequest->setDebug(false);
|
||||
readySend[1] = true;
|
||||
@ -154,9 +174,9 @@ void setup()
|
||||
{
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
while (!Serial);
|
||||
while (!Serial && millis() < 5000);
|
||||
|
||||
Serial.println("\nStarting AsyncHTTPRequest_ESP_Multi using " + String(ARDUINO_BOARD));
|
||||
Serial.print("\nStart AsyncHTTPRequest_ESP_Multi on "); Serial.println(ARDUINO_BOARD);
|
||||
Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION);
|
||||
|
||||
WiFi.mode(WIFI_STA);
|
||||
|
Reference in New Issue
Block a user