Skip to main content

CurateClick

forest.dtflyx.com favicon

Forest

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

Check out Forest on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

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

Latest Weekly Picks

promptbuilder.cc favicon
Weekly Pick

Generate, optimize, test, and manage AI prompts in one place. Turn an idea into a ready-to-use prompt in seconds.

Prompt Builder
freqz.net favicon
Weekly Pick

Your Personal K-Style Vibe Photo Studio

Freqz
webleadr.com favicon
Weekly Pick

Find and contact web design leads and businesses without websites, like local dentists, effortlessly from any location in just a few clicks.

Webleadr

the art of having something to say

pretty-scale.com favicon
Weekly Pick

How Pretty Are You? Let AI Decide.

Pretty Scale
c2story.com favicon
Weekly Pick

Create Illustrated Stories with AI

C2story

Impromptu Speech Topics & Timer

Seedance 2.0: Multimodal AI video creator. Precisely direct characters and cameras to create production-ready, multi-shot cinematic stories in one click.