简体   繁体   中英

Is it possible to consume http response with “Content-Type: multipart/mixed;” with retrofit or okhttp

Actually I'm trying to get audio that is streamed via http with such response:

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

I've found that @Streaming can't be used with RestAdapter.LogLevel.FULL That was the issue!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM