Skip to content

Refactor the ESPAsyncHTTPClient library #1

@larsensolutions

Description

@larsensolutions

Added the ESPAsyncHttpClient library so I could have async API calls.

  • Reason: Using the common HttpClient is blocking the main loop, so whenever a http request went out and a button was pushed while waiting for the response, the button click was not registered. This led to a poor experience really.

However, the ESPAsyncHttpClient is old and buggy and should be refactored. For now I have made changes (like closing connecting when response is received (ref line 113: self->aClient->close(true); ):

  1. Split into methods, the logic finding protocol, port, host etc from the full URL is not working.
  2. Remove the #if and https lines. Don't need that and it is not tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions