简体   繁体   中英

Read response by server push with OkHttp

I am making a simple Android app to test the response from the server which support SPDY Server Push. I've started with the testing site , which should be able to push the rest of resources automatically after issuing the first HTTP request to the page.

I just come across the OkHttp and would like to know whether it already supports accepting the server push stream. If yes, how could I obtain the input stream for the "responses" which are not requested directly?

Thanks!

Currently, pushed data is put directly into the HTTP response cache for future requests. This means that subsequent requests for the pushed content can skip the network.

In version 2, there will be a public API for handing these server pushes at the application level. Expect to see that version in a few months from now.

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