forked from me-no-dev/ESPAsyncWebServer
Add HTTP/1.1 chunked response and allow stream and callback responses to not have content length
ContentLength and ContentType have setters (before you send the response)
This commit is contained in:
@@ -57,6 +57,15 @@ class AsyncCallbackResponse: public AsyncAbstractResponse {
|
||||
size_t _fillBuffer(uint8_t *buf, size_t maxLen);
|
||||
};
|
||||
|
||||
class AsyncChunkedResponse: public AsyncAbstractResponse {
|
||||
private:
|
||||
AwsResponseFiller _content;
|
||||
public:
|
||||
AsyncChunkedResponse(String contentType, AwsResponseFiller callback);
|
||||
bool _sourceValid(){ return !!(_content); }
|
||||
size_t _fillBuffer(uint8_t *buf, size_t maxLen);
|
||||
};
|
||||
|
||||
class cbuf;
|
||||
|
||||
class AsyncResponseStream: public AsyncAbstractResponse, public Print {
|
||||
|
||||
Reference in New Issue
Block a user