Answer the question
In order to leave comments, you need to log in
Why can't I send the file to the server?
I'm trying to send an xml file to the server using the requests library
, I send it like this:
with open("QueryRests.xml","rb") as f:
r = requests.post('http://localhost:8080/opt/in/QueryRests', files={'QueryRests.xml' : f}, headers={"Content-Type" : "multipart/form-data"})
r.text
Error 500 Server Error\n\nHTTP ERROR 500\nProblem accessing /opt/in/QueryRests. Reason:\n Server ErrorCaused by:java.lang.RuntimeException: java.io.IOException: Missing initial multi part boundary
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question