是否可以使用“Content-Type:multipart / mixed”消耗http响应?与改造或okhttp

时间:2014-07-02 15:07:57

标签: android retrofit okhttp

实际上,我正试图通过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>...

1 个答案:

答案 0 :(得分:0)

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

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