Reputation: 41
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!
Upvotes: 4
Views: 773
Reputation: 76125
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.
Upvotes: 2