不熟 Java 但熟 HTTP,決定從零打造簡易 HTTP Client,功能涵蓋:
代碼已開源於 GitHub,歡迎 Star 與貢獻:
git clone git@github.com:suifei/microhttp.gitgit clone https://github.com/suifei/microhttp項目採用模組化設計,核心類包括 HttpClient、Request、Response、ConnectionManager 等,支援鏈式調用風格:
HttpResponse response = HttpClient.get("https://api.example.com/users")
.header("Accept", "application/json")
.execute();
後續計劃:連接池優化、異步非阻塞 IO、HTTP/2 支援、完善測試覆蓋率。
更新日期:2016-05-31