ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

send_P for unint8_t data should be send?

Open penfold42 opened this issue 10 years ago • 3 comments

void send_P(int code, String contentType, const uint8_t * content, size_t len);

Should we drop the _P ?

penfold42 avatar Aug 07 '16 23:08 penfold42

no, because this method reads the data from flash and not from memory ;) even though it says const uint8_t * it actually refers to flash (progmem) saved data.

me-no-dev avatar Aug 12 '16 06:08 me-no-dev

Ok thanks !

Is there a send that will read uint8 from ram ?

I'm building a bitmap on the fly and need to return it.

The printf sample gets close but the NULs will break it

penfold42 avatar Aug 12 '16 15:08 penfold42

May this help? https://github.com/me-no-dev/ESPAsyncWebServer#respond-with-content-using-a-callback Obviously changing "text/plain" with any appropriate mime type.

ClaudioHutte avatar Aug 12 '16 22:08 ClaudioHutte