Skip to main content

Forest

forest.dtflyx.com

Forest 是一个声明式、高层、简洁的 Java HTTP 客户端框架,通过绑定 HTTP 请求信息到自定义接口方法,实现本地方法调用发送 HTTP 请求。具有直观 API 和中文文档支持。

Developer Tools & APIsOpen source#java#http-client#api
Visit website

logo

Gitee Stars JDK License Documentation Author

🍉 项目简介:**声明式**、**高层的**、**简洁的** Java HTTP 客户端框架☕ 官网地址:[https://forest.dtflyx.com/](https://forest.dtflyx.com/)🚀 仓库地址:- Github: [https://github.com/dromara/forest](https://github.com/dromara/forest)- Gitee: [https://gitee.com/dromara/forest](https://gitee.com/dromara/forest)🍔 项目标题:一个高层的、极简的声明式HTTP客户端框架🥃 项目描述:Forest 是一个开源的 Java HTTP 客户端框架,它能够将 HTTP 的所有请求信息(包括 URL、Header 以及 Body 等信息)绑定到您自定义的 Interface 方法上,能够通过调用本地接口方法的方式发送 HTTP 请求。✨ 亮点:采用**声明式**的开发方式,10分钟即可完成请求的**定义**、**发送**、**接收**、**解析**、**错误处理**、**日志打印**等过程,此外还有直观的API和详尽的中文文档#### 🎁 示例代码:- 第一步. 创建接口```javapublic interface AmapClient { /** * 聪明的你一定看出来了@Get注解代表该方法专做GET请求 * 在url中的{0}代表引用第一个参数,{1}引用第二个参数 */ @Get("http://ditu.amap.com/service/regeo?longitude={0}&latitude={1}") Map getLocation(String longitude, String latitude);}```- 第二步. 调用接口```java// 注入接口实例@Resourceprivate AmapClient amapClient;...// 调用接口Map result = amapClient.getLocation("121.475078", "31.223577");System.out.println(result);```#### 🎈 后续更新计划:1. 支持请求模型的开发模式(让Java的HTTP客户端开发更便捷)2. 支持HTTP 2.0

More in Developer Tools & APIs

SolveHub

API for CAPTCHA and anti-bot tasks in authorized testing

Dev Tools ·

liarjs.dev

Scanner that cross-checks browser JavaScript fingerprint against network layer

Dev Tools ·

AntiBrow

Antidetect browser for managing multiple browser identities with real-device

Dev Tools ·

HostlessWP

Open source CLI to move WordPress to Cloudflare Workers

Dev Tools ·

deed.page

Permanent web hosting with an API for AI agents

Dev Tools ·

Rowflare

Open-source Airtable alternative running on your Cloudflare account

Dev Tools ·