micropython-lib/python-ecosys/requests
Brian Whitman e025c843b6 requests: Fix detection of iterators in chunked data requests.
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))
2023-10-05 10:42:14 +11:00
..
requests requests: Fix detection of iterators in chunked data requests. 2023-10-05 10:42:14 +11:00
README.md
example_xively.py
manifest.py requests: Fix detection of iterators in chunked data requests. 2023-10-05 10:42:14 +11:00

README.md

requests

This module provides a lightweight version of the Python requests library.

It includes support for all HTTP verbs, https, json decoding of responses, redirects, basic authentication.

Limitations

  • Certificate validation is not currently supported.
  • A dictionary passed as post data will not do automatic JSON or multipart-form encoding of post data (this can be done manually).
  • Compressed requests/responses are not currently supported.
  • File upload is not supported.
  • Chunked encoding in responses is not supported.