【问题标题】:Is it possible to consume http response with "Content-Type: multipart/mixed;" with retrofit or okhttp是否可以使用“Content-Type:multipart/mixed”来使用 http 响应?通过改造或 okhttp
【发布时间】:2014-07-02 15:07:57
【问题描述】:

实际上,我正在尝试获取通过 http 流式传输的音频,并带有这样的响应:

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Connection: close
Content-Type: multipart/mixed;boundary=audioframe

--audioframe
Content-Type: audio/L16;rate=8000;channels=1
Content-Length: 640
X-Time: 2014-07-02T18:40:31.639+04:00
...<binary data>...
--audioframe
Content-Type: audio/L16;rate=8000;channels=1
Content-Length: 640
X-Time: 2014-07-02T18:40:31.639+04:00
...<binary data>...

【问题讨论】:

    标签: android retrofit okhttp


    【解决方案1】:

    我发现 @Streaming 不能与 RestAdapter.LogLevel.FULL 一起使用 这就是问题所在!

    https://github.com/square/retrofit/issues/561

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-30
      • 2016-10-13
      • 2019-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-19
      相关资源
      最近更新 更多