Git Product home page Git Product logo

Comments (3)

boblemaire avatar boblemaire commented on July 29, 2024

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.

RomeHein avatar RomeHein commented on July 29, 2024

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.

boblemaire avatar boblemaire commented on July 29, 2024

Closing as stale

from asynchttprequest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.