twitter/finagle

Support for uploading files in HTTP client

开放

#501 创建于 2016年4月26日

 (3 条评论) (0 个反应) (0 位负责人)Scala (1,435 个派生)batch import
help wanted

仓库指标

星标
 (8,864 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南