- Notifications
You must be signed in to change notification settings - Fork37
Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP8266 (WiFi or W5x00) and currently STM32 with built-in LAN8742A Ethernet.
License
khoih-prog/AsyncHTTPRequest_Generic
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Important Change from v1.6.0
- Why do we need the new Async AsyncHTTPRequest_Generic library
- Changelog
- Prerequisites
- Installation
- Packages' Patches
- Note for Platform IO using ESP32 LittleFS
- HOWTO Fix
Multiple DefinitionsLinker Error - Note for Platform IO using ESP32 LittleFS
- HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)
- HOWTO use STM32F4 with LAN8720
- HOWTO use ESP8266 with W5x00 Ethernet
- HOWTO use ESP32 with LwIP W5500 or ENC28J60 Ethernet
- Examples
- Example AsyncHTTPRequest_STM32
- Debug Terminal Output Samples
- 1. AsyncHTTPRequest_STM32 running on STM32F7 Nucleo-144 NUCLEO_F767ZI using built-in LAN8742A
- 2. AsyncHTTPRequest_ESP_WiFiManager running on ESP8266_NODEMCU
- 3. AsyncHTTPRequest_ESP_WiFiManager running on ESP32_DEV
- 4. AsyncHTTPRequest_ESP running on ESP8266_NODEMCU
- 5. AsyncWebClientRepeating_STM32 running on STM32F7 Nucleo-144 NUCLEO_F767ZI using built-in LAN8742A
- 6. AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720
- 7. AsyncHTTPRequest_ESP_WiFiManager running on ESP32C3_DEV
- 8. AsyncHTTPRequest_ESP_WiFiManager running on ESP32S3_DEV
- 9. AsyncHTTPRequest_ESP_Multi running on ESP32_DEV
- 10. AsyncHTTPRequest_ESP8266_Ethernet running on ESP8266_NODEMCU_ESP12E using ESP8266_W5500 Ethernet
- 11. AsyncHTTPRequest_ESP8266_Ethernet running on ESP8266_NODEMCU_ESP12E using ESP8266_ENC28J60 Ethernet
- 12. AsyncHTTPRequest_ESP32_ENC on ESP32_DEV with ESP32_ENC28J60New
- 13. AsyncHTTPRequest_ESP32_W5500 on ESP32_DEV with ESP32_W5500New
- 14. AsyncHTTPRequest_ESP32_W6100 on ESP32_DEV with ESP32_W6100New
- Debug
- Troubleshooting
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- License and credits
- Copyright
Please have a look atHOWTO FixMultiple Definitions Linker Error
Why do we need this AsyncAsyncHTTPRequest_Generic library
- Asynchronous HTTP Request library for ESP8266, including ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using built-in WiFi, WT32_ETH01 (ESP32 + LAN8720), ESP32_ENC (ESP32 + LwIP ENC28J60) and STM32 boards using LAN8720 or built-in LAN8742A Ethernet.
- Providing a subset of HTTP.
- Relying on on
ESPAsyncTCPfor ESP8266,AsyncTCPfor ESP32 using built-in WiFi - Relying on
STM32duino LwIP/STM32duino STM32Ethernet/STM32AsyncTCPfor STM32 using LAN8720 or built-in LAN8742A Ethernet. - Methods similar in format and usage to XmlHTTPrequest in Javascript.
- GET, POST, PUT, PATCH, DELETE and HEAD
- Request and response headers
- Chunked response
- Single String response for short (<~5K) responses (heap permitting).
- Optional onData callback.
- Optional onReadyStatechange callback.
This library adds a simple HTTP layer on top of the ESPAsyncTCP/AsyncTCP/STM32 AsyncTCP library tofacilitate REST communication from a Client to a Server. The paradigm is similar to the XMLHttpRequest in Javascript, employing the notion of a ready-state progression through the transaction request.
Synchronization can be accomplished using callbacks on ready-state change, a callback on data receipt, or simply polling for ready-state change. Data retrieval can be incremental as received, or bulk retrieved when the transaction completes provided there is enough heap to buffer the entire response.
The underlying buffering uses a new xbuf class. It handles both character and binary data. Class xbuf uses a chain of small (64 byte) segments that are allocated and added to the tail as data is added and deallocated from the head as data is read, achieving the same result as a dynamic circular buffer limited only by the size of heap. The xbuf implements indexOf and readUntil functions.
For short transactions, buffer space should not be an issue. In fact, it can be more economical than other methods that use larger fixed length buffers. Data is acked when retrieved by the caller, so there is some limited flow control to limit heap usage for larger transfers.
Request and response headers are handled in the typical fashion.
Chunked responses are recognized and handled transparently.
This library is based on, modified from:
- ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, SPIFFS or LittleFS.
- ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM, SPIFFS or LittleFS.
- ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS.
- Using WiFi
- UsingW5x00 withlwIP_w5100 orlwIP_w5500 library
- UsingENC28J60 withlwIP_enc28j60 library
- Nucleo-144 (F429ZI, F746ZG, F756ZG, F767ZI)
- Discovery STM32F746G-DISCOVERY
- Any STM32 boards with enough flash/memory and already configured to run LAN8742A Ethernet.
Support for LAN8720 has beenremoved from STM32 core v2.3.0
- Nucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG)
- Discovery (DISCO_F746NG)
- STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)
Arduino IDE 1.8.19+for Arduino.ESP8266 Core 3.1.1+for ESP8266-based boards.ESP32 Core 2.0.6+for ESP32-based boards. [Latest stable releaseArduino Core for STM32 2.4.0+for for STM32 using built-in Ethernet LAN8742A.ESPAsyncTCP v1.2.2+for ESP8266.AsyncTCP v1.1.1+for ESP32.STM32Ethernet library v1.3.0+for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery).LwIP library v2.1.2+for STM32 using built-in Ethernet LAN8742A on (Nucleo-144, Discovery).STM32AsyncTCP library v1.0.1+for built-in Ethernet on (Nucleo-144, Discovery). To install manually for Arduino IDE.ESPAsync_WiFiManager library v1.15.1+for ESP32/ESP8266 using some examples.LittleFS_esp32 v1.0.6+for ESP32-based boards using LittleFS with ESP32 corev1.0.5-. To install, check.Notice: This
LittleFS_esp32 libraryhas been integrated to ArduinoESP32 core v1.0.6+ andyou don't need to install it if using ESP32 core v1.0.6+WebServer_WT32_ETH01 library v1.5.1+if necessary to use WT32_ETH01 boards. To install, checkWebServer_ESP32_ENC library v1.5.3+if necessary to use ESP32 boards using LwIP ENC28J60 Ethernet. To install, checkWebServer_ESP32_W5500 library v1.5.3+if necessary to use ESP32 boards using LwIP W5500 Ethernet. To install, checkWebServer_ESP32_W6100 library v1.5.3+if necessary to use ESP32 boards using LwIP W6100 Ethernet. To install, check
The best and easiest way is to useArduino Library Manager. Search forAsyncHTTPRequest_Generic, then select / install the latest version. You can also use this link for more detailed instructions.
- Navigate toAsyncHTTPRequest_Generic page.
- Download the latest release
AsyncHTTPRequest_Generic-master.zip. - Extract the zip file to
AsyncHTTPRequest_Generic-masterdirectory - Copy the whole
AsyncHTTPRequest_Generic-masterfolder to Arduino libraries' directory such as~/Arduino/libraries/.
- InstallVS Code
- InstallPlatformIO
- InstallAsyncHTTPRequest_Generic library by usingLibrary Manager. Search for AsyncHTTPRequest_Generic inPlatform.io Author's Libraries
- Use includedplatformio.ini file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples atProject Configuration File
ForGeneric STM32F4 series boards, such asSTM32F407VE, usingLAN8720, please use STM32 corev2.2.0 as breaking corev2.3.0 creates the compile error.
To use LAN8720 on some STM32 boards
- Nucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG)
- Discovery (DISCO_F746NG)
- STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)
you have to copy the filesstm32f4xx_hal_conf_default.h andstm32f7xx_hal_conf_default.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system) to overwrite the old files.
Supposing the STM32 stm32 core version is 2.2.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F4xx/stm32f4xx_hal_conf_default.hfor STM32F4.~/.arduino15/packages/STM32/hardware/stm32/2.2.0/system/STM32F7xx/stm32f7xx_hal_conf_default.hfor Nucleo-144 STM32F7.
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz,these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F4xx/stm32f4xx_hal_conf_default.h- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F7xx/stm32f7xx_hal_conf_default.h
To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards, you have to copy the filesSTM32 variant.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.3.0). You have to modify the files corresponding to your boards, this is just an illustration how to do.
Supposing the STM32 stm32 core version is 2.3.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/NUCLEO_F767ZI/variant.hfor Nucleo-144 NUCLEO_F767ZI.~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/NUCLEO_L053R8/variant.hfor Nucleo-64 NUCLEO_L053R8.
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz,these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/NUCLEO_F767ZI/variant.h~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/NUCLEO_L053R8/variant.h
In Platform IO, to fix the error when usingLittleFS_esp32 v1.0.6 for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line
from
//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */to
#defineCONFIG_LITTLEFS_FOR_IDF_3_2/* For old IDF - like in release 1.0.4*/
It's advisable to use the latestLittleFS_esp32 v1.0.5+ to avoid the issue.
Thanks toRoshan to report the issue inError esp_littlefs.c 'utime_p'
The current library implementation, usingxyz-Impl.h instead of standardxyz.cpp, possibly creates certainMultiple Definitions Linker error in certain use cases.
You can include this.hpp file
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error#include"AsyncHTTPRequest_Generic.hpp"//https://github.com/khoih-prog/AsyncHTTPRequest_Generic
in many files. But be sure to use the following.h filein just 1.h,.cpp or.ino file, which mustnot be included in any other file, to avoidMultiple Definitions Linker Error
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error#include"AsyncHTTPRequest_Generic.h"//https://github.com/khoih-prog/AsyncHTTPRequest_Generic
Check the newmultiFileProject example for aHOWTO demo.
Have a look at the discussion inDifferent behaviour using the src_cpp or src_h lib #80
In Platform IO, to fix the error when usingLittleFS_esp32 v1.0 for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line
from
//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */to
#defineCONFIG_LITTLEFS_FOR_IDF_3_2/* For old IDF - like in release 1.0.4*/
It's advisable to use the latestLittleFS_esp32 v1.0.5+ to avoid the issue.
Thanks toRoshan to report the issue inError esp_littlefs.c 'utime_p'
Please have a look atESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to have more detailed description and solution of the issue.
ADC1controlsADCfunction for pinsGPIO32-GPIO39ADC2controlsADCfunction for pinsGPIO0, 2, 4, 12-15, 25-27
Look in fileadc_common.c
In
ADC2, there're two locks used for different cases:
lock shared with app and Wi-Fi:ESP32:When Wi-Fi using the
ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed.ESP32S2:The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.lock shared between tasks:when several tasks sharing the
ADC2, we want to guaranteeall the requests will be handled.Since conversions are short (about 31us), app returns the lock very soon,we use a spinlock to stand there waiting to do conversions one by one.adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
- In order to use
ADC2for other functions, we have toacquire complicated firmware locks and very difficult to do - So, it's not advisable to use
ADC2with WiFi/BlueTooth (BT/BLE). - Use
ADC1, and pinsGPIO32-GPIO39 - If somehow it's a must to use those pins serviced by
ADC2(GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27), use thefix mentioned at the end ofESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to work with ESP32 WiFi/BlueTooth (BT/BLE).
This is the Wiring for STM32F4 (BLACK_F407VE, etc.) using LAN8720
| LAN8720 PHY | <---> | STM32F4 |
|---|---|---|
| TX1 | <---> | PB_13 |
| TX_EN | <---> | PB_11 |
| TX0 | <---> | PB_12 |
| RX0 | <---> | PC_4 |
| RX1 | <---> | PC_5 |
| nINT/RETCLK | <---> | PA_1 |
| CRS | <---> | PA_7 |
| MDIO | <---> | PA_2 |
| MDC | <---> | PC_1 |
| GND | <---> | GND |
| VCC | <---> | +3.3V |
Connect as follows. To program, useSTM32CubeProgrammer or Arduino IDE with
- U(S)ART Support: "Enabled (generic Serial)"
- Upload Method : "STM32CubeProgrammer (SWD)"
| STLink | <---> | STM32F4 |
|---|---|---|
| SWCLK | <---> | SWCLK |
| SWDIO | <---> | SWDIO |
| RST | <---> | NRST |
| GND | <---> | GND |
| 5v | <---> | 5V |
Connect FDTI (USB to Serial) as follows:
| FDTI | <---> | STM32F4 |
|---|---|---|
| RX | <---> | TX=PA_9 |
| TX | <---> | RX=PA_10 |
| GND | <---> | GND |
This is the wiring for ESP8266W5x00 orENC28J60 Ethernet when usingSS = GPIO16
Line 65 ine3dd512
| #defineCSPIN16// 5 |
| W5x00/ENC28J60 Ethernet | <---> | ESP8266 |
|---|---|---|
| MOSI | <---> | MOSI = GPIO13 |
| MISO | <---> | MISO = GPIO12 |
| SCK | <---> | SCK = GPIO14 |
| SS | <---> | GPIO16 |
| GND | <---> | GND |
| VCC | <---> | +3.3V |
This is the wiring for ESP32W5500,W6100 orENC28J60 Ethernet when usingSS = GPIO5
Lines 60 to 70 ince452fb
| // Optional values to override default settings | |
| //#define SPI_HOST 1 | |
| //#define SPI_CLOCK_MHZ 8 | |
| // Must connect INT to GPIOxx or not working | |
| //#define INT_GPIO 4 | |
| //#define MISO_GPIO 19 | |
| //#define MOSI_GPIO 23 | |
| //#define SCK_GPIO 18 | |
| //#define CS_GPIO 5 |
| W5x00/W6100/ENC28J60 Ethernet | <---> | ESP32 |
|---|---|---|
| MOSI | <---> | MOSI = GPIO23 |
| MISO | <---> | MISO = GPIO19 |
| SCK | <---> | SCK = GPIO18 |
| SS | <---> | GPIO5 |
| INT | <---> | GPIO4 |
| GND | <---> | GND |
| VCC | <---> | +3.3V |
- AsyncHTTPRequest_ESP
- AsyncHTTPRequest_ESP_WiFiManager
- AsyncHTTPMultiRequests_ESP
- AsyncHTTPRequest_ESP_Multi
- AsyncHTTPRequest_ESP8266_Ethernet
- AsyncHTTPRequest_STM32
- AsyncCustomHeader_STM32
- AsyncDweetGet_STM32
- AsyncDweetPost_STM32
- AsyncSimpleGET_STM32
- AsyncWebClientRepeating_STM32
ExampleAsyncHTTPRequest_STM32
Please take a look at other examples, as well.
1. FileAsyncHTTPRequest_STM32.ino
AsyncHTTPRequest_Generic/examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino
Lines 43 to 155 in639ce91
| #include"defines.h" | |
| #defineASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET"AsyncHTTPRequest_Generic v1.10.2" | |
| #defineASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN1010002 | |
| // 600s = 10 minutes to not flooding, 60s in testing | |
| #defineHTTP_REQUEST_INTERVAL_MS60000//600000 | |
| // Uncomment for certain HTTP site to optimize | |
| //#define NOT_SEND_HEADER_AFTER_CONNECTED true | |
| // To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error | |
| #include<AsyncHTTPRequest_Generic.h>// https://github.com/khoih-prog/AsyncHTTPRequest_Generic | |
| #include<Ticker.h>// https://github.com/sstaub/Ticker | |
| AsyncHTTPRequest request; | |
| voidsendRequest(); | |
| // Repeat forever, millis() resolution | |
| TickersendHTTPRequest(sendRequest, HTTP_REQUEST_INTERVAL_MS,0, MILLIS); | |
| voidsendRequest() | |
| { | |
| staticbool requestOpenResult; | |
| if (request.readyState() == readyStateUnsent || request.readyState() == readyStateDone) | |
| { | |
| //requestOpenResult = request.open("GET", "http://worldtimeapi.org/api/timezone/Europe/London.txt"); | |
| requestOpenResult = request.open("GET","http://worldtimeapi.org/api/timezone/America/Toronto.txt"); | |
| if (requestOpenResult) | |
| { | |
| // Only send() if open() returns true, or crash | |
| request.send(); | |
| } | |
| else | |
| { | |
| Serial.println("Can't send bad request"); | |
| } | |
| } | |
| else | |
| { | |
| Serial.println("Can't send request"); | |
| } | |
| } | |
| voidrequestCB(void *optParm, AsyncHTTPRequest *request,int readyState) | |
| { | |
| (void) optParm; | |
| if (readyState == readyStateDone) | |
| { | |
| 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("**************************************")); | |
| } | |
| } | |
| } | |
| voidsetup() | |
| { | |
| Serial.begin(115200); | |
| while (!Serial &&millis() <5000); | |
| Serial.print("\nStart AsyncHTTPRequest_STM32 on"); | |
| Serial.println(BOARD_NAME); | |
| Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION); | |
| #if defined(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) | |
| if (ASYNC_HTTP_REQUEST_GENERIC_VERSION_INT < ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN) | |
| { | |
| Serial.print("Warning. Must use this example on Version equal or later than :"); | |
| Serial.println(ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET); | |
| } | |
| #endif | |
| // start the ethernet connection and the server | |
| // Use random mac | |
| uint16_t index =millis() % NUMBER_OF_MAC; | |
| // Use Static IP | |
| //Ethernet.begin(mac[index], ip); | |
| // Use DHCP dynamic IP and random mac | |
| Ethernet.begin(mac[index]); | |
| Serial.print(F("AsyncHTTPRequest @ IP :")); | |
| Serial.println(Ethernet.localIP()); | |
| Serial.println(); | |
| request.setDebug(false); | |
| request.onReadyStateChange(requestCB); | |
| sendHTTPRequest.start();//start the ticker. | |
| // Send first request now | |
| //delay(60); | |
| sendRequest(); | |
| } | |
| voidloop() | |
| { | |
| sendHTTPRequest.update(); | |
| } |
2. Filedefines.h
AsyncHTTPRequest_Generic/examples/AsyncHTTPRequest_STM32/defines.h
Lines 22 to 134 in639ce91
| /* | |
| Currently support | |
| 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as : | |
| - Nucleo-144 (F429ZI, F767ZI) | |
| - Discovery (STM32F746G-DISCOVERY) | |
| - STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet, | |
| - See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1) | |
| 2) STM32F/L/H/G/WB/MP1 boards (with 32+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false) | |
| 3) STM32F/L/H/G/WB/MP1 boards (with 32+K Flash) running W5x00 shields | |
| */ | |
| #ifndefdefines_h | |
| #definedefines_h | |
| #if !( defined(STM32F0)|| defined(STM32F1)|| defined(STM32F2)|| defined(STM32F3)||defined(STM32F4)|| defined(STM32F7)|| \ | |
| defined(STM32L0)|| defined(STM32L1)|| defined(STM32L4)|| defined(STM32H7)||defined(STM32G0)|| defined(STM32G4)|| \ | |
| defined(STM32WB)|| defined(STM32MP1) ) | |
| #error This code is designed to run on STM32F/L/H/G/WB/MP1 platform! Please check your Tools->Board setting. | |
| #endif | |
| #defineASYNC_HTTP_DEBUG_PORT Serial | |
| // Use from 0 to 4. Higher number, more debugging messages and memory usage. | |
| #define_ASYNC_HTTP_LOGLEVEL_ 1 | |
| #if defined(STM32F0) | |
| #warning STM32F0 board selected | |
| #defineBOARD_TYPE "STM32F0" | |
| #elif defined(STM32F1) | |
| #warning STM32F1 board selected | |
| #defineBOARD_TYPE "STM32F1" | |
| #elif defined(STM32F2) | |
| #warning STM32F2 board selected | |
| #defineBOARD_TYPE "STM32F2" | |
| #elif defined(STM32F3) | |
| #warning STM32F3 board selected | |
| #defineBOARD_TYPE "STM32F3" | |
| #elif defined(STM32F4) | |
| #warning STM32F4 board selected | |
| #defineBOARD_TYPE "STM32F4" | |
| #elif defined(STM32F7) | |
| #warning STM32F7 board selected | |
| #defineBOARD_TYPE "STM32F7" | |
| #elif defined(STM32L0) | |
| #warning STM32L0 board selected | |
| #defineBOARD_TYPE "STM32L0" | |
| #elif defined(STM32L1) | |
| #warning STM32L1 board selected | |
| #defineBOARD_TYPE "STM32L1" | |
| #elif defined(STM32L4) | |
| #warning STM32L4 board selected | |
| #defineBOARD_TYPE "STM32L4" | |
| #elif defined(STM32H7) | |
| #warning STM32H7 board selected | |
| #defineBOARD_TYPE "STM32H7" | |
| #elif defined(STM32G0) | |
| #warning STM32G0 board selected | |
| #defineBOARD_TYPE "STM32G0" | |
| #elif defined(STM32G4) | |
| #warning STM32G4 board selected | |
| #defineBOARD_TYPE "STM32G4" | |
| #elif defined(STM32WB) | |
| #warning STM32WB board selected | |
| #defineBOARD_TYPE "STM32WB" | |
| #elif defined(STM32MP1) | |
| #warning STM32MP1 board selected | |
| #defineBOARD_TYPE "STM32MP1" | |
| #else | |
| #warning STM32 unknown board selected | |
| #defineBOARD_TYPE "STM32 Unknown" | |
| #endif | |
| #ifndefBOARD_NAME | |
| #defineBOARD_NAME BOARD_TYPE | |
| #endif | |
| #include<LwIP.h> | |
| #include<STM32Ethernet.h> | |
| //#include <AsyncUDP_STM32.h> | |
| // Enter a MAC address and IP address for your controller below. | |
| #defineNUMBER_OF_MAC 20 | |
| bytemac[][NUMBER_OF_MAC]= | |
| { | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x01 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x02 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x03 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x04 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x05 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x06 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x07 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x08 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x09 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0A }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0B }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0C }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0D }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0E }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x0F }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x10 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x11 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x12 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x13 }, | |
| {0xDE,0xAD,0xBE,0xEF,0x32,0x14 }, | |
| }; | |
| // Select the static IP address according to your local network | |
| IPAddressip(192,168,2,232); | |
| #endif//defines_h |
1.AsyncHTTPRequest_STM32 running on STM32F7 Nucleo-144 NUCLEO_F767ZI using built-in LAN8742A
Start AsyncHTTPRequest_STM32 on NUCLEO_F767ZIAsyncHTTPRequest_Generic v1.13.0AsyncHTTPRequest @ IP :192.168.2.178**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:54:16.675525-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675227256utc_datetime:2023-02-01T04:54:16.675525+00:00utc_offset: -05:00week_number:5**************************************HHHHHH **************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:55:16.675337-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675227316utc_datetime:2023-02-01T04:55:16.675337+00:00utc_offset: -05:00week_number:5**************************************
2.AsyncHTTPRequest_ESP_WiFiManager running on ESP8266_NODEMCU
Starting AsyncHTTPRequest_ESP_WiFiManagerusing LittleFS on ESP8266_NODEMCUAsyncHTTPRequest_Generic v1.13.0Stored: SSID = HueNet1, Pass =12345678Got stored Credentials. Timeout 120sConnectMultiWiFi in setupAfter waiting3.43 secs more insetup(), connection result is connected. Local IP: 192.168.2.186H**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-01-31T23:56:16.674942-05:00day_of_week: 2day_of_year: 31dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227376utc_datetime: 2023-02-01T04:56:16.674942+00:00utc_offset: -05:00week_number: 5**************************************HHHHHH
3.AsyncHTTPRequest_ESP_WiFiManager running on ESP32_DEV
Starting AsyncHTTPRequest_ESP_WiFiManagerusing SPIFFS on ESP32_DEVAsyncHTTPRequest_Generic v1.13.0Stored: SSID = HueNet1, Pass =12345678Got stored Credentials. Timeout 120sConnectMultiWiFi in setupAfter waiting2.35 secs more insetup(), connection result is connected. Local IP: 192.168.2.232H**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-01-31T23:56:16.674942-05:00day_of_week: 2day_of_year: 31dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227376utc_datetime: 2023-02-01T04:56:16.674942+00:00utc_offset: -05:00week_number: 5**************************************HHHHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-01-31T23:57:16.675848-05:00day_of_week: 2day_of_year: 31dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227436utc_datetime: 2023-02-01T04:57:16.675848+00:00utc_offset: -05:00week_number: 5**************************************HHHHHHHHH HHHHHHHHHH HHHHHHHHHH
4.AsyncHTTPRequest_ESP running on ESP8266_NODEMCU
Starting AsyncHTTPRequest_ESPusing ESP8266_NODEMCUAsyncHTTPRequest_Generic v1.13.0Connecting to WiFi SSID: HueNet1...........HTTP WebServer is @ IP :192.168.2.81**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:58:16.676610-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675227496utc_datetime:2023-02-01T04:58:16.676610+00:00utc_offset: -05:00week_number:5**************************************HHHHHHHHH HHHHHHHHHH HHHHHHHHHH H
5.AsyncWebClientRepeating_STM32 running on STM32F7 Nucleo-144 NUCLEO_F767ZI using built-in LAN8742A
Start AsyncWebClientRepeating_STM32 on NUCLEO_F767ZIAsyncHTTPRequest_Generic v1.13.0AsyncHTTPRequest @ IP :192.168.2.72************************************** `:;;;,` .:;;:. .;;;;;;;;;;;` :;;;;;;;;;;: TM `;;;;;;;;;;;;;;;` :;;;;;;;;;;;;;;; :;;;;;;;;;;;;;;;;;; `;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;; .;;;;;;;;;;;;;;;;;;;; ;;;;;;;;:` `;;;;;;;;; ,;;;;;;;;.` .;;;;;;;; .;;;;;;, :;;;;;;; .;;;;;;; ;;;;;;; ;;;;;; ;;;;;;; ;;;;;;, ;;;;;;. ,;;;;; ;;;;;;.;;;;;;` ;;;;;; ;;;;;. ;;;;;;;;;;;` ``` ;;;;;` ;;;;; ;;;;;;;;;, ;;; .;;;;;`;;;;: `;;;;;;;; ;;; ;;;;;,;;;;` `,,,,,,,, ;;;;;;; .,,;;;,,, ;;;;;:;;;;` .;;;;;;;; ;;;;;, :;;;;;;;; ;;;;;:;;;;` .;;;;;;;; `;;;;;; :;;;;;;;; ;;;;;.;;;;. ;;;;;;;. ;;; ;;;;; ;;;;; ;;;;;;;;; ;;; ;;;;; ;;;;; .;;;;;;;;;; ;;; ;;;;;, ;;;;;; `;;;;;;;;;;;; ;;;;; `;;;;;, .;;;;;; ;;;;;;; ;;;;;; ;;;;;;: :;;;;;;. ;;;;;;; ;;;;;; ;;;;;;;` .;;;;;;;, ;;;;;;;; ;;;;;;;: ;;;;;;;;;:,:;;;;;;;;;: ;;;;;;;;;;:,;;;;;;;;;; `;;;;;;;;;;;;;;;;;;;. ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; :;;;;;;;;;;;;;;;;: ,;;;;;;;;;;;;;, ;;;;;;;;;;;;;; .;;;;;;;;;` ,;;;;;;;;: ;;; ;;;;;` ;;;;: .;; ;; ,;;;;;, ;;. `;, ;;;; ;;; ;;:;;; ;;;;;; .;; ;; ,;;;;;: ;;; `;, ;;;:;; ,;:; ;; ;; ;; ;; .;; ;; ,;, ;;;,`;, ;; ;; ;; ;: ;; ;; ;; ;; .;; ;; ,;, ;;;;`;, ;; ;;. ;: ;; ;;;;;: ;; ;; .;; ;; ,;, ;;`;;;, ;; ;;` ,;;;;; ;;`;; ;; ;; .;; ;; ,;, ;; ;;;, ;; ;; ;; ,;, ;; .;; ;;;;;: ;;;;;: ,;;;;;: ;; ;;, ;;;;;; ;; ;; ;; ;;` ;;;;. `;;;: ,;;;;;, ;; ;;, ;;;;
6.AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720
Starting AsyncHTTPRequest_WT32_ETH01 on ESP32_DEV with ETH_PHY_LAN8720WebServer_WT32_ETH01 v1.5.1AsyncHTTPRequest_Generic v1.13.0ETH MAC: A8:03:2A:A1:61:73, IPv4:192.168.2.232, FULL_DUPLEX, 100MbpsAsyncHTTPRequest @ IP :192.168.2.232**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:59:16.675139-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675227556utc_datetime:2023-02-01T04:59:16.675139+00:00utc_offset: -05:00week_number:5**************************************
7.AsyncHTTPRequest_ESP_WiFiManager running on ESP32C3_DEV
Starting AsyncHTTPRequest_ESP_WiFiManagerusing LittleFS on ESP32C3_DEVESPAsync_WiFiManager v1.15.0AsyncHTTPRequest_Generic v1.13.0Stored: SSID = HueNet1, Pass = passwordGot stored Credentials. Timeout 120sConnectMultiWiFi in setupAfter waiting9.23 secs more insetup(), connection result is connected. Local IP: 192.168.2.85H**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-01-31T23:59:16.675139-05:00day_of_week: 2day_of_year: 31dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227556utc_datetime: 2023-02-01T04:59:16.675139+00:00utc_offset: -05:00week_number: 5**************************************HHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-02-01T00:00:16.675788-05:00day_of_week: 3day_of_year: 32dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227616utc_datetime: 2023-02-01T05:00:16.675788+00:00utc_offset: -05:00week_number: 5**************************************
8.AsyncHTTPRequest_ESP_WiFiManager running on ESP32S3_DEV
Starting AsyncHTTPRequest_ESP_WiFiManagerusing LittleFS on ESP32S3_DEVESPAsync_WiFiManager v1.15.0AsyncHTTPRequest_Generic v1.13.0Stored: SSID = HueNet1, Pass = passwordGot stored Credentials. Timeout 120sConnectMultiWiFi in setupAfter waiting7.77 secs more insetup(), connection result is connected. Local IP: 192.168.2.83H**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-02-01T00:01:16.675231-05:00day_of_week: 3day_of_year: 32dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227676utc_datetime: 2023-02-01T05:01:16.675231+00:00utc_offset: -05:00week_number: 5**************************************HHHHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime: 2023-02-01T00:02:16.675810-05:00day_of_week: 3day_of_year: 32dst: falsedst_from: dst_offset: 0dst_until: raw_offset: -18000timezone: America/Torontounixtime: 1675227736utc_datetime: 2023-02-01T05:02:16.675810+00:00utc_offset: -05:00week_number: 5**************************************
9.AsyncHTTPRequest_ESP_Multi running on ESP32_DEV
The terminal output ofAsyncHTTPRequest_ESP_Multi example running onESP32_DEV to demonstrate how to send requests to multiple addresses and receive responses from them.
Starting AsyncHTTPRequest_ESP_Multiusing ESP32_DEVAsyncHTTPRequest_Generic v1.13.0Connecting to WiFi SSID: HueNet1.......AsyncHTTPSRequest @ IP :192.168.2.88Sending request: http://worldtimeapi.org/api/timezone/Europe/Prague.txtSending request: http://www.myexternalip.com/raw**************************************abbreviation: CETclient_ip: aaa.bbb.ccc.ddddatetime:2023-02-01T03:46:24.358630+01:00day_of_week:3day_of_year:32dst:falsedst_from: dst_offset:0dst_until: raw_offset:3600timezone: Europe/Pragueunixtime:1675219584utc_datetime:2023-02-01T02:46:24.358630+00:00utc_offset: +01:00week_number:5****************************************************************************aaa.bbb.ccc.ddd**************************************Sending request: http://worldtimeapi.org/api/timezone/America/Toronto.txt**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T21:46:24.411920-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675219584utc_datetime:2023-02-01T02:46:24.411920+00:00utc_offset: -05:00week_number:5**************************************HHH
10.AsyncHTTPRequest_ESP8266_Ethernet running on ESP8266_NODEMCU_ESP12E using ESP8266_W5500 Ethernet
The terminal output ofAsyncHTTPRequest_ESP8266_Ethernet example running onESP8266_NODEMCU_ESP12E to demonstrate how to use ESP8266_W5500 Ethernet Async feature.
Starting AsyncHTTPRequest_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12Eusing ESP8266_W5500 EthernetAsyncHTTPRequest_Generic v1.13.0Connecting ethernet..Ethernet IP address:192.168.2.187**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:13:24.464322-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224804utc_datetime:2023-02-01T04:13:24.464322+00:00utc_offset: -05:00week_number:5**************************************HHHHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:14:24.465232-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224864utc_datetime:2023-02-01T04:14:24.465232+00:00utc_offset: -05:00week_number:5**************************************HH
11.AsyncHTTPRequest_ESP8266_Ethernet running on ESP8266_NODEMCU_ESP12E using ESP8266_ENC28J60 Ethernet
The terminal output ofAsyncHTTPRequest_ESP8266_Ethernet example running onESP8266_NODEMCU_ESP12E to demonstrate how to use ESP8266_ENC28J60 Ethernet Async feature.
Starting AsyncHTTPRequest_ESP8266_Ethernet on ESP8266_NODEMCU_ESP12Eusing ESP8266_ENC28J60 EthernetAsyncHTTPRequest_Generic v1.13.0Connecting to network : ..........................................................Ethernet IP address:192.168.2.187**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:11:24.464025-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224684utc_datetime:2023-02-01T04:11:24.464025+00:00utc_offset: -05:00week_number:5**************************************HHHHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:12:24.463868-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224744utc_datetime:2023-02-01T04:12:24.463868+00:00utc_offset: -05:00week_number:5**************************************
12.AsyncHTTPRequest_ESP32_ENC on ESP32_DEV with ESP32_ENC28J60
The terminal output ofAsyncHTTPRequest_ESP32_ENC example running onESP32_DEV with ESP32_ENC28J60 to demonstrate how to use ESP32LwIP ENC28J60 Ethernet Async feature.
Start AsyncHTTPRequest_ESP32_ENC on ESP32_DEV with ESP32_ENC28J60WebServer_ESP32_ENC v1.5.3for core v2.0.0+AsyncHTTPRequest_Generic v1.13.0ETH StartedETH ConnectedETH MAC: DE:AD:BE:EF:BE:0A, IPv4:192.168.2.98FULL_DUPLEX, 10MbpsHTTP WebClient is @ IP :192.168.2.98**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:09:24.464676-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224564utc_datetime:2023-02-01T04:09:24.464676+00:00utc_offset: -05:00week_number:5**************************************HH HHHH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:10:24.464712-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224624utc_datetime:2023-02-01T04:10:24.464712+00:00utc_offset: -05:00week_number:5**************************************
13.AsyncHTTPRequest_ESP32_W5500 on ESP32_DEV with ESP32_W5500
The terminal output ofAsyncHTTPRequest_ESP32_W5500 example running onESP32_DEV with ESP32_W5500 to demonstrate how to use ESP32LwIP W5500 Ethernet Async feature.
Start AsyncHTTPRequest_ESP32_W5500 on ESP32_DEV with ESP32_W5500WebServer_ESP32_W5500 v1.5.3for core v2.0.0+AsyncHTTPRequest_Generic v1.13.0ETH StartedETH ConnectedETH MAC: DE:AD:BE:EF:FE:11, IPv4:192.168.2.101FULL_DUPLEX, 100MbpsHTTP WebClient is @ IP :192.168.2.101**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:07:24.465199-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224444utc_datetime:2023-02-01T04:07:24.465199+00:00utc_offset: -05:00week_number:5**************************************HHHH HH**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:08:24.467686-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675224504utc_datetime:2023-02-01T04:08:24.467686+00:00utc_offset: -05:00week_number:5**************************************HHHH
14.AsyncHTTPRequest_ESP32_W6100 on ESP32_DEV with ESP32_W6100
The terminal output ofAsyncHTTPRequest_ESP32_W6100 example running onESP32_DEV with ESP32_W5500 to demonstrate how to use ESP32LwIP W5500 Ethernet Async feature.
Start AsyncHTTPRequest_ESP32_W6100 on ESP32_DEV with ESP32_W6100WebServer_ESP32_W6100 v1.5.3for core v2.0.0+AsyncHTTPRequest_Generic v1.13.0ETH StartedETH ConnectedETH MAC:98:F4:AB:09:13:EB, IPv4:192.168.2.154FULL_DUPLEX, 100MbpsHTTP WebClient is @ IP :192.168.2.154**************************************abbreviation: ESTclient_ip: aaa.bbb.ccc.ddddatetime:2023-01-31T23:54:16.675525-05:00day_of_week:2day_of_year:31dst:falsedst_from: dst_offset:0dst_until: raw_offset: -18000timezone: America/Torontounixtime:1675227256utc_datetime:2023-02-01T04:54:16.675525+00:00utc_offset: -05:00week_number:5**************************************HH HHHH
Debug is enabled by default on Serial.
You can also change the debugging level from 0 to 4
#defineASYNC_HTTP_DEBUG_PORT Serial// Use from 0 to 4. Higher number, more debugging messages and memory usage.#define_ASYNC_HTTP_LOGLEVEL_1
If you get compilation errors, more often than not, you may need to install a newer version of theESP32 / ESP8266 / STM32 core for Arduino.
Sometimes, the library will only work if you update theESP32 / ESP8266 / STM32 core to the latest version because I am using newly added functions.
Submit issues to:AsyncHTTPRequest_Generic issues
- Fix bug. Add enhancement
- Add support to more Ethernet / WiFi shields with lwIP-based feature.
- Add support to more boards.
- Add many more examples.
- Initially add support to STM32 using built-in LAN8742A Etnernet. Tested onSTM32F7 Nucleo-144 F767ZI.
- Add more examples.
- Add debugging features.
- Add PUT, PATCH, DELETE and HEAD besides GET and POST.
- Add support toEthernet LAN8720 usingSTM32Ethernet library, for boards such asNucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG), Discovery (DISCO_F746NG) andSTM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)
- Add support toWT32_ETH01 using ESP32-based boards and LAN8720 Ethernet
- Auto detect ESP32 core to use for WT32_ETH01
- Fix bug in WT32_ETH01 examples to reduce connection time
- Fix
multiple-definitionslinker error and weird bug related tosrc_cpp. - Optimize library code by using
reference-passinginstead ofvalue-passing - Enable compatibility with old code to include only
AsyncHTTPRequest_Generic.h - Add support toESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS
- Add
LittleFSsupport toESP32-C3 - Use
ESP32-core's LittleFSlibrary instead ofLorol's LITTLEFSlibrary for ESP32 core v2.0.0+ - Add exampleAsyncHTTPRequest_ESP_Multi to demonstrate how to send requests to multiple addresses and receive responses from them.
- Add support to ESP8266 usingW5x00 withlwIP_w5100 orlwIP_w5500 library
- Add support to ESP8266 usingENC28J60 withlwIP_enc28j60 library
- Fix long timeout if using
IPAddress. - Remove support to STM32 usingLAN8720 due to problem with new STM32 core v2.3.0
- Fix ESP32 chipID for example
AsyncHTTPRequest_ESP_WiFiManager - Remove dependency on
LittleFS_esp32library to prevent PIO error when using new ESP32 core v1.0.6+ - Not try to reconnect to the same
host:portafter connected - Fix bug of wrong
reqStatesintroduced fromv1.9.0 - Default to reconnect to the same
host:portafter connected for new HTTP sites. - Add support to ESP32 boards using
LwIP ENC28J60 Ethernet - Use
allman astyleand addutils. Restyle the library - Add support to ESP32 boards using
LwIP W5500 Ethernet - Fix "blank new line in chunk" bug #50
- Add support to ESP32 boards using
LwIP W6100 Ethernet - Fix bug of
_parseURL(). CheckBug with _parseURL() #21 - Improve
README.mdso that links can be used in other sites, such asPIO
This library is based on, modified, bug-fixed and improved from:
- Bob Lemaire'sasyncHTTPrequest Library to use the betterasynchronous features of these following Async TCP Libraries : (
ESPAsyncTCP,AsyncTCP, andSTM32AsyncTCP). - Thanks toDaniel Brunner to report and make PR inFixed linker errors when included in multiple .cpp files leading to v1.0.1. SeeHOWTO Fix
Multiple DefinitionsLinker Error - Thanks togleniat to make enhancement request inAdd support for sending PUT, PATCH, DELETE request leading to v1.1.0.
- Thanks toBadDwarf to reportcompatibility with ESPAsyncWebServer #11 leading to the enhancement in v1.1.2.
- Thanks tospdi to report'Connection' header expects 'disconnect' instead 'close' ? #13 leading to new release v1.1.3 to fix bug.
- Thanks toandrewk123 to reportHttp GET polling causes crash when host disconnected #22 leading to new release v1.4.0 to fix bug.
- Thanks toDavidAntonin to reportCannot send requests to different addresses #4 leading to new release v1.7.1 to demonstrate how to send requests to multiple addresses and receive responses from them.
- Thanks toper1234 to make PRRemove unavailable items from depends field of library.properties leading to v1.8.2
- Thanks tomiwied to reportsetTimeout() hasn't any effect #38 leading to new release v1.9.0
- Thanks toValentinsStorre to reportRelease 1.9 breaks previously running code #39 leading to new release v1.10.1
- Thanks toDirk Vranckaert to reportCallback behaviour is buggy (ESP8266) #43 leading to new release v1.10.1
- Thanks toSeeliSoft to reportHost/Headers not always sent with 1.10.1 #44 leading to new release v1.10.2
- Thanks to1618033 to make PRFix "blank new line in chunk" bug #50 leading to new release v1.12.0
- Thanks toredphx to reportBug with _parseURL() #21 leading to new release v1.13.0
![]() ⭐️ Bob Lemaire | ![]() Daniel Brunner | ![]() gleniat | ![]() BadDwarf | ![]() spdi | ![]() andrewk123 |
![]() DavidAntonin | ![]() per1234 | ![]() miwied | ![]() ValentinsStorre | ![]() Dirk Vranckaert | ![]() SeeliSoft |
![]() 1618033 | ![]() redphx |
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library
- The library is licensed underGPLv3
Copyright (C) <2018> <Bob Lemaire, IoTaWatt, Inc.>
Copyright (C) 2020- Khoi Hoang
About
Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP libraries, such as AsyncTCP, ESPAsyncTCP, AsyncTCP_STM32, etc.. for ESP32 (including ESP32_S2, ESP32_S3 and ESP32_C3), WT32_ETH01 (ESP32 + LAN8720), ESP8266 (WiFi or W5x00) and currently STM32 with built-in LAN8742A Ethernet.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.















