📜  我应该使用单调 okhttpclient - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:23.807000             🧑  作者: Mango

代码示例1
OkHttp performs best when you create a single OkHttpClient instance and reuse it for all of your HTTP calls. 
This is because each client holds its own connection pool and thread pools. Reusing connections and threads reduces latency and saves memory. 
Conversely, creating a client for each request wastes resources on idle pools.