asyncHTTPrequest | asynchronous HTTP for ESP using ESPasyncTCP

 by   boblemaire C++ Version: Current License: GPL-3.0

kandi X-RAY | asyncHTTPrequest Summary

kandi X-RAY | asyncHTTPrequest Summary

asyncHTTPrequest is a C++ library. asyncHTTPrequest has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

NOTE: This was originally intended for ESP8266, although it works fine for HTTP on ESP32. For a non-async version that handles HTTPS on ESP32, see the follow-on esp32HTTPrequest in this repo. Asynchronous HTTP for ESP8266 and ESP32. Subset of HTTP. Built on ESPAsyncTCP (AsyncTCP for ESP32) Methods similar in format and use to XmlHTTPrequest in Javascript. This library adds a simple HTTP layer on top of the ESPAsyncTCP library to facilitate 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. 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. Testing has not been extensive, but it is a fairly lean library, and all of the functions were tested to some degree. It is working flawlessly in the application for which it was designed. Possibly I'll revisit this in the future and add support for additional HTTP request types like PUT. See the Wiki for an explanation of the various methods. Following is a snippet of code using this library, along with a sample of the debug output trace from normal operation. The context is that this code is in a process that runs as a state machine to post data to an external server. Suffice it to say that none of the calls block, and that the program does other things while waiting for the readyState to become 4. There are a few different methods available to synchronize on completion and to extract the resonse data, especially long responses. This is a simpler example.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              asyncHTTPrequest has a low active ecosystem.
              It has 47 star(s) with 26 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 27 have been closed. On average issues are closed in 22 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of asyncHTTPrequest is current.

            kandi-Quality Quality

              asyncHTTPrequest has 0 bugs and 0 code smells.

            kandi-Security Security

              asyncHTTPrequest has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              asyncHTTPrequest code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              asyncHTTPrequest is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              asyncHTTPrequest releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of asyncHTTPrequest
            Get all kandi verified functions for this library.

            asyncHTTPrequest Key Features

            No Key Features are available at this moment for asyncHTTPrequest.

            asyncHTTPrequest Examples and Code Snippets

            No Code Snippets are available at this moment for asyncHTTPrequest.

            Community Discussions

            QUESTION

            Unknown error in upload image :class anonymous class derived from asynchttpResponsehandler must either be declared abstract
            Asked 2020-Mar-30 at 08:16

            I'm a novice If possible check out the following code I don't understand the problem My program is trying to upload a file to the server. But in this part of the code there is an error That is not understandable to me

            error:class anonymous class derived from asynchttpResponsehandler must either be declared abstract or implement abstract method onsuccess()in asynchttpResponsehandler

            ...

            ANSWER

            Answered 2020-Mar-30 at 08:16

            The error says that AsyncHttpResponseHandler must implement the onSuccess function.

            Edit: After checking your, imports as commented by other user, you have imported wrong Header class. You need to import cz.msebera.android.httpclient.Header instead of cz.msebera.android.httpclient.entity.mime.Header class.

            Look code below for understanding

            Source https://stackoverflow.com/questions/60911210

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install asyncHTTPrequest

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/boblemaire/asyncHTTPrequest.git

          • CLI

            gh repo clone boblemaire/asyncHTTPrequest

          • sshUrl

            git@github.com:boblemaire/asyncHTTPrequest.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link