MicroPython now supplies SSL/TLS functionality in a new built-in `tls`
module. The `ssl` module is now implemented purely in Python, in this
repository. Other libraries are updated to work with this scheme.
Signed-off-by: Felix Dörre <felix@dogcraft.de>
Chunked detection does not work as generators never have an `__iter__`
attribute. They do have `__next__`.
Example that now works with this commit:
def read_in_chunks(file_object, chunk_size=4096):
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
file = open(filename, "rb")
r = requests.post(url, data=read_in_chunks(file))
This module implements a subset of the Python requests module, and so
it should have the same name.
Added a backwards-compatibility wrapper to allow people to continue to use
`import urequests`. This lives in micropython/urequests.
Changed requests to be a package, so that we can implement extension
packages in the future for optional functionality.
Added a basic README.md to both.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>