micropython-lib/python-ecosys/requests
Mirza Kapetanovic 1f019f90ea requests: Make possible to override headers and allow raw data upload.
This removes all the hard-coded request headers from the requests module so
they can be overridden by user provided headers dict.  Furthermore allow
streaming request data without chunk encoding in those cases where content
length is known but it's not desirable to load the whole content into
memory.  Also some servers (e.g. nginx) reject HTTP/1.0 requests with the
Transfer-Encoding header set.

The change should be backwards compatible as long as the user hasn't
provided any of the previously hard-coded headers.

Signed-off-by: Mirza Kapetanovic <mirza.kapetanovic@gmail.com>
2024-06-14 10:25:39 +10:00
..
requests requests: Make possible to override headers and allow raw data upload. 2024-06-14 10:25:39 +10:00
README.md requests: Rename urequests to requests. 2023-07-23 11:41:44 +10:00
example_xively.py requests: Rename urequests to requests. 2023-07-23 11:41:44 +10:00
manifest.py requests: Make possible to override headers and allow raw data upload. 2024-06-14 10:25:39 +10:00
test_requests.py requests: Make possible to override headers and allow raw data upload. 2024-06-14 10:25:39 +10: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.