Refactoring: From OkHttp to Ktor

Kafka mentioned that the Android SDK has also been implemented. We attempted to refactor by migrating from OkHttp to Ktor. This is not just a library replacement, but a shift in mindset—from a “callback-based Java style” to a “structured concurrency Kotlin style.” Asynchronous and Concurrency Model of Kotlin/Ktor <span>RealTimeTranscribeClient</span>’s Ktor refactored version demonstrates the Kotlin … Read more

Recommended Tools: 6 Must-Have HTTP Client Libraries for Java Developers, From Classic to Future

Recommended Tools: 6 Must-Have HTTP Client Libraries for Java Developers, From Classic to Future

Little by little, one travels far;Little by little, one accumulates a river and a sea.Daily sharing of Java technologyFollow 【Programming Reflections】 to receive valuable content promptly! 01 Introduction In the previous two issues, we introduced four tools that allow calling third-party <span>APIs</span> as smoothly as calling interfaces. • <span>dromara</span>‘s <span>Forest</span> • <span>SpringCloud</span>‘s <span>OpenFeign</span> • <span>Spring6</span>‘s … Read more

OkHttp: The Eagle of Network Requests

OkHttp: The Eagle of Network Requests

Java Kitchen: OkHttp, The Eagle of Network Requests! Introduction Hey friends, today we are going to talk about something “down-to-earth”! Remember the story I shared last time about “ordering takeout during overtime, only to have it delivered late”? At that moment, I thought, wouldn’t it be cool if we could simulate the network process of … Read more

OkHttp: The Efficient Messenger for HTTP Requests!

OkHttp: The Efficient Messenger for HTTP Requests!

OkHttp: The Efficient Messenger for HTTP Requests! Introduction: Niu Ge’s Pitfall Experience Hey friends, Niu Ge is back to share a story! I remember when I switched to Java, there was a requirement to write a program to fetch weather data and display it to users. At that time, I had only a vague understanding … Read more

Detailed Explanation of ResTempale and OkHttp3

Detailed Explanation of ResTempale and OkHttp3

📌 1. Core Definitions and Basic Understanding (What?) 1. Official Documentation/Specifications • Positioning: OkHttp is a modern and efficient HTTP & HTTP/2 client open-sourced by Square (official documentation). • Core Objectives: • Support for HTTP/2 and WebSocket • Connection pool reuse to reduce latency • Transparent GZIP compression • Response caching • Automatic retries and … Read more

One Line of Code to Handle HTTP Requests – Extremely Powerful~

One Line of Code to Handle HTTP Requests - Extremely Powerful~

OKHttpUtil In the world of Java, the HTTP client has long been dominated by Apache’s HttpClient. However, due to its large size and complex API, it is not widely used in many scenarios. While emerging libraries like OkHttp and Jodd-http are indeed user-friendly, they still come with a learning curve in certain situations. Often, we … Read more

HTTP Client Connection: Choosing Between HttpClient and OkHttp

HTTP Client Connection: Choosing Between HttpClient and OkHttp

Click on the blue text above“ Reply with “666” to receive the most popular Java core knowledge summary on the internet Is He Tiantian here? https://www.jianshu.com/p/68c30beca612 Code example: https://github.com/TiantianUpup/http-call Introduction The reason for writing this article stems from a conversation with a friend. This touches on my knowledge blind spot, so I started by searching … Read more

HttpClient is Outdated, OkHttp is Losing Ground! This Tool is the New King!

HttpClient is Outdated, OkHttp is Losing Ground! This Tool is the New King!

We are dedicated to exploring, sharing, and recommending the latest practical technology stacks, open-source projects, frameworks, and useful tools. Fresh open-source information awaits your discovery every day! Using <span>SpringBoot</span> directly with <span>OkHttp</span>, <span>HttpClient</span>, or <span>RestTemplate</span> to initiate <span>HTTP</span> requests is cumbersome and inconvenient for unified management. Therefore, we recommend a lightweight HTTP client framework suitable … Read more

Advanced Customization of OkHttp: Request Retries, Caching Strategies, and DNS Optimization for Mastering Network Requests!

Advanced Customization of OkHttp: Request Retries, Caching Strategies, and DNS Optimization for Mastering Network Requests!

Advanced Customization of OkHttp: Request Retries, Caching Strategies, and DNS Optimization for Mastering Network Requests! Last year during the Double Eleven shopping festival, our e-commerce app suddenly experienced a large number of network request timeouts during peak hours, leading to a flood of user complaints about product pages not loading. After urgent investigation, we found … Read more

Bypassing OkHttp3 Certificate Validation [Demo Included]

Bypassing OkHttp3 Certificate Validation [Demo Included]

Disclaimer:The technologies, ideas, and tools mentioned in this article are for educational purposes only and should be used for security-related learning and communication. No one is allowed to use them for illegal purposes or for profit; otherwise, the consequences will be borne by the user!If there are any infringements, please let me know, and I … Read more