requests-scala icon indicating copy to clipboard operation
requests-scala copied to clipboard

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

Open swapgupt opened this issue 1 year ago • 0 comments

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

swapgupt avatar Oct 10 '23 06:10 swapgupt