twitter/finagle

Support for uploading files in HTTP client

Open

#501 aperta il 26 apr 2016

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Scala (1435 fork)batch import
help wanted

Metriche repository

Star
 (8864 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I am abandoning scalaj-http in favour of Finagle. The only feature that I am missing is support for file uploads. From what I have found, there is no direct equivalent to this scalaj-http code:

val response = scalaj.http.Http(url)
  .postMulti(scalaj.http.MultiPart(
    "file",
    file.getName,
    Files.probeContentType(file.toPath),
    new FileInputStream(file),
    file.length(),
    onWrite))

Guida contributor