I am able to send a post request to a Fastapi endpoint using CURL, but trying to implement the same using requests package.
Below CURL request works fine.
curl -s -X POST 'http://localhost:8080/image' -H 'accept: application/json' -H 'Content-Type: multipart/form-data' -F 'file=img.png'
How to convert this curl request into requests.post?
Looked at various github and stackoverflow samples, kept getting an different error codes as 400, 500, 422.
Code after conversion using Curlconverter requests code