com-lihaoyi / requests-scala

A Scala port of the popular Python Requests HTTP client: flexible, intuitive, and straightforward to use.
Other
730 stars 86 forks source link

On uploading a csv file using requests-scala, I am getting error as File attachment not found. #144

Open swapgupt opened 1 year ago

swapgupt commented 1 year ago

Discussed in https://github.com/com-lihaoyi/requests-scala/discussions/143

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 ))