Hello,
I need to POST a big chunk of data to a https-endpoint. (Send an email via Mailgun). I did try a lot of things (using SMTP etc.) but my ESP32 never has enough memory when the requests get a bit bigger. Smaller requests work well with urequests.post().
My newest idea is to POST with HTTP chuncked transfer, and to send my data line by line directly from a file on the flash. Like this memory usage should be minimal. I was able to update this async-http-client (uaiohttpclient) to create a chunked Post request. Unfortunatly it is not possible to send it over SSL, which I need.
The relevant code in uaiohttpclient is:
Code: Select all
reader, writer = yield from asyncio.open_connection(host, 80)
I changed the code to:
Code: Select all
reader, writer = yield from asyncio.open_connection(host=host, port=port, ssl=is_ssl)
Any idea where to go from here would be appreciated.
Thanks,
Leo