when i make the following request:
curl -X POST http://localhost:8080/endpoint \
-F "file=filepath/example.zip" \
-H "Content-Type: multipart/form-data"
everything works fine. However, when i try to do the same in python:
import requests
url = "http://localhost:8080/endpoint"
files = {"file": open("example.zip", "rb")}
headers = {"Content-Type": "multipart/form-data"}
r = requests.post(url, files=files, headers=headers)
the api gives me an error. are these two code snippets not equivalent? thanks