Hey guys,
after a little research why some of my requests end in an error I thought there might be a "best practice" to send multiple GET-requests in a short while (with library HTTPClient).
My basics: After I had a little problem with Cloudflare blocking my Vodafone home static IP address I added a delay for sending the requests. I collect up to 30 requests in an array and after a random delay for each request (between 1 and 10 seconds) I send every single request.
Some requests instantly work properly (code 200), some end in an error (-11). The requests themself are okay because after the 2nd / 3rd try the same "faulty" requests get also a 200.
Now I saw that -11 means HTTPC_ERROR_READ_TIMEOUT. Those requests take longer as I can see via Serial.print().
Could I solve this -11 problematic by using http.setReuse(true)? Does someone have a better idea how to improve that and prevent failing of sending some requests?
Intention (besides my "perfectionism" [as perfect I can act as a absolute beginner): At the same time a water pump could run which is controlled by time - if the requests take longer than expected the pump also runs longer which could cause some flooding in my living room....
Best practice sending multiple HTTP GET requests
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: Google [Bot], Qwantbot and 2 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.
Information
Espressif ESP32 ... Available now!