adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 36 forks source link

uploading multipart/form-data requests #89

Open bozulbang opened 2 years ago

bozulbang commented 2 years ago

Issue: adafruit_requests library should be able to easily upload multipart/form-data requests

Description: The adafruit_requests library currently only lets you easily make requests via JSON or via url-encoded form parameters. It would be helpful if it also let you easily make multipart/form-data requests.

My use case is that I want to be able to call the Neocities file upload API from a CircuitPython device, so that I can update a website based on sensor data. This API only accepts multipart/form-data requests. I can build one by setting the Content-Type header and building up a request body manually, but it's the sort of thing I would prefer to have a library handle for me.

Can provide further detail upon request!

thanks for all you do.