Originally posted by **swapgupt** October 10, 2023
Below is my code snippet. Please let me know if I am doing anything wrong.
val multipartBody = MultiPart(MultiItem("demo", new File(filePath)))
val response: Try[requests.Response] = Try(requests.post(
url,
data = multipartBody,
headers = headers
))
Discussed in https://github.com/com-lihaoyi/requests-scala/discussions/143