Comments (3)
For ESP32 the code includes the ESP32 specific ESPAsyncTCP.h. Depending on your IDE, you need to include that in your compile.
I've moved away from this code for ESP32. It works OK but doesn't support https. There is a newer esp32HTTPrequest that is can be substituted. It uses all of the same methods and works the same way, except that it's not asynchronous. It uses the native ESP-IDF HTTP client, which seem to work well. The async capabilities of the older asyncHTTPrequest were needed to get async on the ESP8266, but with the ESP32, you can simply run it in a separate FREErtos task to avoid blocking. Next pass I intend to add some code to allow seamless async by forking a task to do the open and perform, so it will work just like the older asyncHTTPrequest, but also support https.
Caveat-emptor, the new module, while based on the older async code, is not fully tested. It serves my needs reliably but beyond that I'm open to looking at problems others may have, or better to entertain PRs to fix any new issues.
from asynchttprequest.
thanks for your very prompt answer.
For the esp32 the AsyncClient would be in AsyncTCP.h library. Which I already include in my sketch:
#include <AsyncTCP.h>
#include <asyncHTTPrequest.h>
and I still get this compilation error.
I was using the native HTTPClient for the esp32 but I kept having this weird issue with it, where any request would send back a "connection refused", even with something as simple as this:
HTTPClient http;
http.begin(client, "http://192.168.1.110:80/test");
Also I'm trying to use as much async code as I can, as the firmware (ESPecial) I'm developing do many different things at the same time. Even with two cores it can get tricky. For instance I use a telegram bot (from this repo: https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot) which is not async, and therefor has to poll telegram server every second or so, then wait for an answer. This block one core on its own... And now I'm adding video streaming 😅
from asynchttprequest.
Closing as stale
from asynchttprequest.
Related Issues (20)
- Can't make secure HTTP (HTTPS) request HOT 1
- ESP32 crashes when making simultaneous requests with 2 instances HOT 3
- Connection not Closing HOT 3
- Question: Identifying Caller in Callback HOT 3
- Question: Use of Optional Argument in asyncHTTPRequest::onReadyStateChange() HOT 1
- Crash on Loading Data HOT 2
- Basic Authentication using URL Encoding (in POST) Crashes with Guru Meditation Error
- URL without trailing '/' after address causes crash on ESP32 HOT 1
- Issue when assigning result to a string HOT 2
- Following redirects? HOT 1
- HTTPS HOT 1
- Compilation error on ESP8285 and PlatformIO
- Feature request: make readyStates public HOT 1
- Crash after second request to not accessible target HOT 9
- HTTP Basic Auth login password HOT 1
- Hello ! HOT 1
- Want to make 2 different requests, but how to say to the "void requestCB" function to which requests the result belongs ? HOT 8
- "Off by one" error in header values ? HOT 1
- assert failed: block_trim_free HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asynchttprequest.