# dromara/forest

A high-level and lightweight declarative HTTP client framework for Java. it makes sending HTTP requests in Java easier.

Repository: https://github.com/dromara/forest
Canonical: https://ross.abutalabs.com/products/forest
Language: Java
License: MIT
License Family: permissive
Topics: declarative-http-client, http, http-client, https, rest, restful, socks, java-http-client, request, fegin, retrofit
Last push: 2026-01-26T21:37:49+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 64, release rhythm 51, longevity 100
- inputs: {"age_days": 3421, "days_push": 219, "days_rel": 327, "gap_med": 0, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1941, forks 239 (observed 2026-08-28T04:05:57.395484+00:00)

## What it is
Forest is a high-level, lightweight declarative HTTP client framework for Java that lets developers send HTTP requests by defining annotated interfaces and calling local-looking methods. It supports multiple backends (HttpClient, OkHttp), template expressions, interceptors, JSON/XML/Protobuf serialization, OAuth2, file upload/download, async calls, and Spring/Spring Boot integration.

## Use cases
- call third-party REST APIs from Java without boilerplate
- define HTTP clients as annotated interfaces like Feign or Retrofit
- send GET/POST/PUT/DELETE requests declaratively in Spring Boot
- upload and download files over HTTP in Java
- serialize request and response bodies as JSON, XML, or Protobuf
- handle OAuth2 authentication for external APIs
- send asynchronous HTTP requests with callbacks
- consume Server-Sent Events (SSE) endpoints in Java

## When to choose
- you want a Feign/Retrofit-style declarative HTTP client without Spring Cloud or a registry
- you need flexible template expressions and custom annotations for request definitions
- you want pluggable JSON/XML converters (Fast, Jackson, Gson, JAXB)
- you need both programmatic and declarative request styles in one framework

## When to avoid
- you need a reactive, non-blocking HTTP client with backpressure (e.g., WebFlux WebClient)
- your project is not on the JVM or does not use Java 8+
- you only need simple one-off requests where a plain HttpClient or OkHttp call suffices
- you require gRPC or binary RPC rather than HTTP/REST

## Facets
- artifact type: framework
- maturity: active
- function: http-client, serialization, middleware, web-framework
- domain: web-development, backend, apis, developer-tools
- platform: jvm, cross-platform
- tags: declarative-http-client, annotations, spring-boot-starter, okhttp, httpclient, rest-client, feign-alternative, retrofit-alternative, oauth2, file-upload, sse, async-requests, spring

## Member repositories
- dromara/forest (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:57.395484+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:08:06.169372+00:00, confidence not recorded.
  - readme: https://github.com/dromara/forest (fetched 2026-08-28T04:05:57.395484+00:00, sha 7ae64cbe177c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
