Android open source library interview questions set

Talk about your understanding of Okhttp?

Comparison of Volley and OkHttp:

  • Volley: HTTPS is supported. Cached, asynchronous requests, synchronous requests are not supported. The protocol type is Http/1.0, Http/1.1, HttpUrlConnection/HttpClient is used for network transmission, and IO is used for data read and write.
  • OkHttp: HTTPS is supported. Cache, asynchronous requests, synchronous requests. The protocol type is Http/1.0, Http/1.1, SPDY, Http/2.0, WebSocket, the encapsulated Socket is used for network transmission, and NIO (Okio) is used for data reading and writing.

The SPDY protocol is similar to HTTP, but is designed to reduce the loading time of web pages and improve security. The SPDY protocol reduces load times through compression, multiplexing, and prioritization.

The subsystem hierarchy diagram of Okhttp is as follows:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325943746&siteId=291194637