unirest-java-3

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Unirest-Java 3.x Reference (v3.14.5)

Unirest-Java 3.x 参考文档(v3.14.5)

This skill covers the Unirest-Java 3.x HTTP client library for Java 8+. It uses Apache HttpClient 4 as the HTTP engine and includes GSON as the default JSON parser.
本 skill 涵盖适用于 Java 8+ 的 Unirest-Java 3.x HTTP 客户端库。它使用 Apache HttpClient 4 作为 HTTP 引擎,并将 GSON 作为默认 JSON 解析器。

Capability Boundaries

能力边界

✅ Strong Suits

✅ 适用场景

  1. Building HTTP requests (GET, POST, PUT, DELETE, PATCH) with fluent API
  2. JSON/object mapping with built-in GSON (no extra dependency needed)
  3. Async requests with CompletableFuture (via Apache HttpAsyncClient)
  4. File uploads with progress monitoring
  5. Mock testing for HTTP clients
  6. Response caching with configurable eviction
  7. Proxy configuration (simple, system, per-request)
  8. Request/response interceptors for logging and auth
  9. Connection pool tuning (
    concurrency(total, perRoute)
    )
  10. Socket timeout control (independent of connect timeout)
  11. Automatic retries on socket errors (
    automaticRetries()
    )
  12. Shutdown hooks for background thread management
  13. Custom HostnameVerifier support
  1. 使用流畅 API 构建 HTTP 请求(GET、POST、PUT、DELETE、PATCH)
  2. 使用内置 GSON 进行 JSON/对象映射(无需额外依赖)
  3. 通过 CompletableFuture 发起异步请求(基于 Apache HttpAsyncClient)
  4. 文件上传及进度监控
  5. 针对 HTTP 客户端进行模拟测试
  6. 可配置驱逐策略的响应缓存
  7. 代理配置(简单代理、系统代理、单请求代理)
  8. 用于日志记录和身份验证的请求/响应拦截器
  9. 连接池调优(
    concurrency(total, perRoute)
    )
  10. Socket 超时控制(独立于连接超时)
  11. Socket 错误自动重试(
    automaticRetries()
    )
  12. 用于管理后台线程的关闭钩子
  13. 支持自定义 HostnameVerifier

⚠️ Requirements

⚠️ 要求

  1. Java 8 or higher
  2. Apache HttpClient 4 (transitive dependency)
  3. Maven/Gradle dependency management
  1. Java 8 或更高版本
  2. Apache HttpClient 4(传递依赖)
  3. Maven/Gradle 依赖管理

❌ Out of Scope (with alternatives)

❌ 不在范围内(替代方案)

  1. HTTP/2 → use Unirest 4.x (defaults to HTTP/2)
  2. WebSocket via Unirest → use Apache HttpClient WebSocket or dedicated library
  3. Server-Sent Events (SSE) → use Unirest 4.x or custom implementation
  4. Custom executor support → not available in 3.x
  5. Java Authenticator integration → use Apache-specific auth mechanisms
  6. ProxySelector support → use per-request proxies or system properties
  1. HTTP/2 → 使用 Unirest 4.x(默认使用 HTTP/2)
  2. 通过 Unirest 使用 WebSocket → 使用 Apache HttpClient WebSocket 或专用库
  3. Server-Sent Events(SSE)→ 使用 Unirest 4.x 或自定义实现
  4. 自定义 executor 支持 → 3.x 不支持
  5. Java Authenticator 集成 → 使用 Apache 特有的身份验证机制
  6. ProxySelector 支持 → 使用单请求代理或系统属性

When to Use This Skill

何时使用本 skill

Use this skill when the user needs to:
  • Make HTTP requests to REST APIs in Java 8+ projects
  • Use Apache HttpClient as the HTTP engine
  • Have built-in GSON without extra dependencies
  • Tune connection pools (
    concurrency()
    )
  • Control socket timeout independently
  • Use automatic retries on socket errors
  • Configure per-request proxies
  • Use custom HostnameVerifier
当用户需要以下功能时,使用本 skill:
  • 在 Java 8+ 项目中向 REST API 发起 HTTP 请求
  • 使用 Apache HttpClient 作为 HTTP 引擎
  • 无需额外依赖即可使用内置 GSON
  • 调整连接池(
    concurrency()
    )
  • 独立控制 socket 超时
  • 对 socket 错误启用自动重试
  • 配置单请求代理
  • 使用自定义 HostnameVerifier

Quick Start

快速开始

Maven dependency (Unirest 3.14.5):
xml
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.5</version>
</dependency>
✅ No JSON module declaration needed — GSON is included by default.
Minimal GET request:
java
String body = Unirest.get("https://api.example.com/users")
    .asString()
    .getBody();
Minimal POST with JSON:
java
HttpResponse<JsonNode> response = Unirest.post("https://api.example.com/users")
    .header("Content-Type", "application/json")
    .body(new User("Alice", "alice@example.com"))
    .asJson();
Maven 依赖(Unirest 3.14.5):
xml
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.5</version>
</dependency>
✅ 无需声明 JSON 模块 — 默认已包含 GSON。
最小 GET 请求:
java
String body = Unirest.get("https://api.example.com/users")
    .asString()
    .getBody();
使用 JSON 的最小 POST 请求:
java
HttpResponse<JsonNode> response = Unirest.post("https://api.example.com/users")
    .header("Content-Type", "application/json")
    .body(new User("Alice", "alice@example.com"))
    .asJson();

Critical: Installation

关键:安装

Unirest 3.x is a single dependency that includes GSON by default:
xml
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.5</version>
</dependency>
✅ No need to declare a separate JSON module —
JsonObjectMapper
(GSON-based) is included.
Unirest 3.x 只需一个依赖,默认包含 GSON:
xml
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.5</version>
</dependency>
✅ 无需单独声明 JSON 模块 — 已包含基于 GSON 的
JsonObjectMapper
。

Critical: Configuration

关键:配置

All configuration goes through
Unirest.config()
:
java
Unirest.config()
    .connectTimeout(5000)
    .socketTimeout(10000)
    .concurrency(200, 20)
    .setDefaultHeader("Accept", "application/json")
    .setDefaultBasicAuth("user", "pass")
    .followRedirects(true)
    .verifySsl(true)
    .enableCookieManagement(true)
    .automaticRetries(true)
    .proxy("proxy.com", 8080, "user", "pass");
Key config options:
MethodImpactDefault
connectTimeout(int)
Connection timeout (ms)10000
socketTimeout(int)
Socket/read timeout (ms)60000
concurrency(int, int)
Max total connections, max per route200/20
followRedirects(boolean)
Follow HTTP redirectstrue
verifySsl(boolean)
Enforce SSL verificationtrue
enableCookieManagement(boolean)
Accept/store cookiestrue
automaticRetries(boolean)
Auto-retry on socket errors (up to 4 times)true
retryAfter(boolean)
Auto-retry on 429/529 with Retry-After headerfalse
defaultBaseUrl(String)
Default base URL for all requestsnone
addShutdownHook(boolean)
Register JVM shutdown hookfalse
useSystemProperties(boolean)
Use system properties for proxies etc.true
Multiple configurations:
java
// Primary instance (same as static Unirest)
UnirestInstance unirest = Unirest.primaryInstance();

// Spawn a new independent instance
UnirestInstance custom = Unirest.spawnInstance();
custom.config().connectTimeout(3000);
⚠️ If you spawn a new instance, YOU are responsible for shutting it down.
See references/configuration.md for full config table, interceptors, object mappers, and metrics.
所有配置均通过
Unirest.config()
完成:
java
Unirest.config()
    .connectTimeout(5000)
    .socketTimeout(10000)
    .concurrency(200, 20)
    .setDefaultHeader("Accept", "application/json")
    .setDefaultBasicAuth("user", "pass")
    .followRedirects(true)
    .verifySsl(true)
    .enableCookieManagement(true)
    .automaticRetries(true)
    .proxy("proxy.com", 8080, "user", "pass");
关键配置项:
方法影响默认值
connectTimeout(int)
连接超时(毫秒)10000
socketTimeout(int)
Socket/读取超时(毫秒)60000
concurrency(int, int)
最大总连接数、每条路由的最大连接数200/20
followRedirects(boolean)
跟随 HTTP 重定向true
verifySsl(boolean)
强制执行 SSL 验证true
enableCookieManagement(boolean)
接受/存储 Cookietrue
automaticRetries(boolean)
Socket 错误时自动重试(最多 4 次)true
retryAfter(boolean)
遇到 429/529 且包含 Retry-After 请求头时自动重试false
defaultBaseUrl(String)
所有请求的默认基础 URL无
addShutdownHook(boolean)
注册 JVM 关闭钩子false
useSystemProperties(boolean)
使用系统属性配置代理等true
多实例配置:
java
// Primary instance (same as static Unirest)
UnirestInstance unirest = Unirest.primaryInstance();

// Spawn a new independent instance
UnirestInstance custom = Unirest.spawnInstance();
custom.config().connectTimeout(3000);
⚠️ 如果创建新实例,则需要由你负责关闭它。
请参阅 references/configuration.md 获取完整配置表、拦截器、对象映射器和指标。

Critical: Making Requests

关键:发起请求

Basic request types:
java
Unirest.get("http://localhost/users").asString();
Unirest.post("http://localhost/users").body(json).asJson();
Unirest.put("http://localhost/users/1").body(user).asEmpty();
Unirest.delete("http://localhost/users/1").asEmpty();
Route parameters:
java
Unirest.get("http://localhost/users/{id}")
    .routeParam("id", "42")
    .asString();
// Results in http://localhost/users/42
Query parameters:
java
Unirest.get("http://localhost/search")
    .queryString("q", "unirest")
    .queryString("page", 1)
    .asString();
Headers and auth:
java
Unirest.get("http://localhost/protected")
    .header("X-Custom", "value")
    .basicAuth("user", "pass")
    .asString();
Form data:
java
Unirest.post("http://localhost/form")
    .field("name", "Alice")
    .field("age", 30)
    .asEmpty();
File upload:
java
Unirest.post("http://localhost/upload")
    .field("file", new File("/path/to/file.zip"))
    .asEmpty();
Async request:
java
CompletableFuture<HttpResponse<JsonNode>> future = Unirest.get("http://localhost/data")
    .asJsonAsync(response -> {
        System.out.println(response.getBody());
    });
Per-request proxy (3.x only):
java
Unirest.get("http://localhost/data")
    .proxy("proxy.com", 8080)
    .asString();
JSON Patch (RFC-6902):
java
Unirest.jsonPatch("http://localhost/resource")
    .add("/fruits/-", "Apple")
    .remove("/bugs")
    .replace("/name", "Updated")
    .asJson();
See references/requests.md for upload progress, paged requests, client certificates, and more.
基础请求类型:
java
Unirest.get("http://localhost/users").asString();
Unirest.post("http://localhost/users").body(json).asJson();
Unirest.put("http://localhost/users/1").body(user).asEmpty();
Unirest.delete("http://localhost/users/1").asEmpty();
路由参数:
java
Unirest.get("http://localhost/users/{id}")
    .routeParam("id", "42")
    .asString();
// Results in http://localhost/users/42
查询参数:
java
Unirest.get("http://localhost/search")
    .queryString("q", "unirest")
    .queryString("page", 1)
    .asString();
请求头和身份验证:
java
Unirest.get("http://localhost/protected")
    .header("X-Custom", "value")
    .basicAuth("user", "pass")
    .asString();
表单数据:
java
Unirest.post("http://localhost/form")
    .field("name", "Alice")
    .field("age", 30)
    .asEmpty();
文件上传:
java
Unirest.post("http://localhost/upload")
    .field("file", new File("/path/to/file.zip"))
    .asEmpty();
异步请求:
java
CompletableFuture<HttpResponse<JsonNode>> future = Unirest.get("http://localhost/data")
    .asJsonAsync(response -> {
        System.out.println(response.getBody());
    });
单请求代理(仅限 3.x):
java
Unirest.get("http://localhost/data")
    .proxy("proxy.com", 8080)
    .asString();
JSON Patch(RFC-6902):
java
Unirest.jsonPatch("http://localhost/resource")
    .add("/fruits/-", "Apple")
    .remove("/bugs")
    .replace("/name", "Updated")
    .asJson();
请参阅 references/requests.md 了解上传进度、分页请求、客户端证书等更多信息。

Critical: Handling Responses

关键:处理响应

Response types:
java
// String
String body = Unirest.get(url).asString().getBody();

// Object mapping (GSON included by default)
Book book = Unirest.get(url).asObject(Book.class).getBody();

// Generic types
List<Book> books = Unirest.get(url)
    .asObject(new GenericType<List<Book>>(){}).getBody();

// JSON
JsonNode json = Unirest.get(url).asJson().getBody();

// File
File file = Unirest.get(url).asFile("/tmp/download.zip").getBody();

// Empty (status/headers only)
HttpResponse resp = Unirest.delete(url).asEmpty();
Error handling:
java
Unirest.get("http://localhost/data")
    .asJson()
    .ifSuccess(response -> handleSuccess(response))
    .ifFailure(response -> {
        log.error("Status: " + response.getStatus());
        response.getParsingError().ifPresent(e -> {
            log.error("Parse error: " + e.getMessage());
        });
    });
Parsing errors:
java
response.getParsingError().ifPresent(ex -> {
    String originalBody = ex.getOriginalBody();
    String message = ex.getMessage();
});
Map error objects:
java
HttpResponse<Book> book = Unirest.get(url).asObject(Book.class);
Error err = book.mapError(Error.class);
See references/responses.md for download progress, large responses, body mapping, and more.
响应类型:
java
// String
String body = Unirest.get(url).asString().getBody();

// Object mapping (GSON included by default)
Book book = Unirest.get(url).asObject(Book.class).getBody();

// Generic types
List<Book> books = Unirest.get(url)
    .asObject(new GenericType<List<Book>>(){}).getBody();

// JSON
JsonNode json = Unirest.get(url).asJson().getBody();

// File
File file = Unirest.get(url).asFile("/tmp/download.zip").getBody();

// Empty (status/headers only)
HttpResponse resp = Unirest.delete(url).asEmpty();
错误处理:
java
Unirest.get("http://localhost/data")
    .asJson()
    .ifSuccess(response -> handleSuccess(response))
    .ifFailure(response -> {
        log.error("Status: " + response.getStatus());
        response.getParsingError().ifPresent(e -> {
            log.error("Parse error: " + e.getMessage());
        });
    });
解析错误:
java
response.getParsingError().ifPresent(ex -> {
    String originalBody = ex.getOriginalBody();
    String message = ex.getMessage();
});
映射错误对象:
java
HttpResponse<Book> book = Unirest.get(url).asObject(Book.class);
Error err = book.mapError(Error.class);
请参阅 references/responses.md 了解下载进度、大型响应、请求体映射等更多信息。

Critical: Mocking

关键:模拟

Static mock:
java
MockClient mock = MockClient.register();

mock.expect(HttpMethod.GET, "http://api.example.com/users")
    .thenReturn("{\"name\":\"Alice\"}")
    .withStatus(200);

String body = Unirest.get("http://api.example.com/users")
    .asString().getBody();
// body == "{\"name\":\"Alice\"}"

mock.verifyAll(); // Verify all expects were called
Instance mock (3.x requires both clients):
java
UnirestInstance unirest = Unirest.spawnInstance();
MockClient mock = MockClient.register(unirest);
// In 3.x, the mock implements both Client and AsyncClient
Body matching:
java
mock.expect(HttpMethod.POST, "http://api.example.com/users")
    .body(FieldMatcher.of("name", "Alice", "role", "admin"))
    .thenReturn()
    .withStatus(201);
Verify with times:
java
var expect = mock.expect(HttpMethod.GET, "http://api.example.com/users").thenReturn();
expect.verify();              // At least once
expect.verify(Times.never()); // Never called
See references/mocking.md for POJO responses, multiple expects, and more.
静态 mock:
java
MockClient mock = MockClient.register();

mock.expect(HttpMethod.GET, "http://api.example.com/users")
    .thenReturn("{\"name\":\"Alice\"}")
    .withStatus(200);

String body = Unirest.get("http://api.example.com/users")
    .asString().getBody();
// body == "{\"name\":\"Alice\"}"

mock.verifyAll(); // Verify all expects were called
实例 mock(3.x 需要同时注册两个客户端):
java
UnirestInstance unirest = Unirest.spawnInstance();
MockClient mock = MockClient.register(unirest);
// In 3.x, the mock implements both Client and AsyncClient
请求体匹配:
java
mock.expect(HttpMethod.POST, "http://api.example.com/users")
    .body(FieldMatcher.of("name", "Alice", "role", "admin"))
    .thenReturn()
    .withStatus(201);
按次数验证:
java
var expect = mock.expect(HttpMethod.GET, "http://api.example.com/users").thenReturn();
expect.verify();              // At least once
expect.verify(Times.never()); // Never called
请参阅 references/mocking.md 了解 POJO 响应、多个预期请求等更多信息。

Critical: Caching

关键:缓存

Basic caching:
java
Unirest.config().cacheResponses(true);
Advanced caching with options:
java
Unirest.config().cacheResponses(Cache.builder()
    .depth(100)                      // Max entries
    .maxAge(5, TimeUnit.MINUTES));   // Entry TTL
Custom cache (e.g., Guava):
java
Unirest.config().cacheResponses(
    Cache.builder().backingCache(new MyGuavaCache()));
See references/caching.md for custom cache implementation details.
基础缓存:
java
Unirest.config().cacheResponses(true);
使用选项的高级缓存:
java
Unirest.config().cacheResponses(Cache.builder()
    .depth(100)                      // Max entries
    .maxAge(5, TimeUnit.MINUTES));   // Entry TTL
自定义缓存(例如 Guava):
java
Unirest.config().cacheResponses(
    Cache.builder().backingCache(new MyGuavaCache()));
请参阅 references/caching.md 了解自定义缓存实现的详细信息。

Critical: Proxies

关键:代理

Simple proxy:
java
Unirest.config().proxy("proxy.com", 8080, "user", "pass");
Per-request proxy (3.x only):
java
Unirest.get("http://localhost/data")
    .proxy("proxy.com", 8080)
    .asString();
System properties (default: true in 3.x):
java
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "7777");
// useSystemProperties defaults to true in 3.x
See references/proxies.md for details.
简单代理:
java
Unirest.config().proxy("proxy.com", 8080, "user", "pass");
单请求代理(仅限 3.x):
java
Unirest.get("http://localhost/data")
    .proxy("proxy.com", 8080)
    .asString();
系统属性(3.x 中默认值为 true):
java
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "7777");
// useSystemProperties defaults to true in 3.x
请参阅 references/proxies.md 了解详细信息。

Quick Fixes

快速修复

ErrorCauseFix
NoClassDefFoundError: kong/unirest/Unirest
Wrong packageUse
import kong.unirest.*
(not
kong.unirest.core.*
)
asObject()
returns null body
Response parsing failedCheck
response.getParsingError()
for details
ConnectException: Connection timed out
Server unreachable or timeout too lowIncrease
connectTimeout
or check network
SocketTimeoutException
Read timeout exceededIncrease
socketTimeout
(default 60000ms)
SSLHandshakeException
SSL verification failureUse
verifySsl(false)
for dev only, fix certs in prod
Proxy not workingSystem props may be disabledCheck
useSystemProperties(true)
(default true in 3.x)
Too many connectionsConnection pool exhaustedIncrease
concurrency(total, perRoute)
Automatic retries not workingDisabled or not applicableCheck
automaticRetries(true)
(default true)
错误原因修复方法
NoClassDefFoundError: kong/unirest/Unirest
包名错误使用
import kong.unirest.*
(不要使用
kong.unirest.core.*
)
asObject()
返回 null 请求体
响应解析失败检查
response.getParsingError()
获取详细信息
ConnectException: Connection timed out
无法访问服务器或超时时间过短增加
connectTimeout
或检查网络
SocketTimeoutException
读取超时增加
socketTimeout
(默认值为 60000ms)
SSLHandshakeException
SSL 验证失败仅在开发环境中使用
verifySsl(false)
,生产环境中应修复证书
代理不工作系统属性可能已禁用检查
useSystemProperties(true)
(3.x 中默认值为 true)
连接数过多连接池已耗尽增加
concurrency(total, perRoute)
自动重试不工作已禁用或不适用检查
automaticRetries(true)
(默认值为 true)

Gotchas

易踩坑事项

  1. Java 8+ is sufficient — 3.x runs on Java 8 (unlike 4.x which requires Java 11+)
  2. GSON included by default — No need to declare a separate JSON module (unlike 4.x)
  3. Package is
    kong.unirest
    — Not
    kong.unirest.core
    (that's 4.x)
  4. Single Maven dependency —
    unirest-java:3.14.5
    (unlike 4.x which uses BOM + core + module)
  5. Apache HttpClient engine — Uses Apache HttpClient 4 (not java.net.http.HttpClient)
  6. Socket timeout is independent —
    socketTimeout()
    controls read timeout separately from
    connectTimeout()
  7. Connection pool tuning —
    concurrency(total, perRoute)
    lets you tune Apache's connection pool
  8. Automatic retries enabled by default —
    automaticRetries(true)
    retries socket errors up to 4 times
  9. Per-request proxies supported —
    request.proxy(host, port)
    works (removed in 4.x)
  10. HostnameVerifier supported —
    hostnameVerifier(verifier)
    for custom SSL hostname verification
  11. Shutdown hooks available —
    addShutdownHook(true)
    registers JVM shutdown hooks
  12. System proxy props enabled by default —
    useSystemProperties
    defaults to
    true
    (unlike 4.x)
  13. No WebSocket via Unirest — Use Apache HttpClient WebSocket or a dedicated library
  14. No SSE support —
    Unirest.sse()
    does not exist in 3.x
  15. Mock registration requires both clients — MockClient implements both
    Client
    and
    AsyncClient
  1. Java 8+ 已足够 — 3.x 可在 Java 8 上运行(不同于要求 Java 11+ 的 4.x)
  2. 默认包含 GSON — 无需声明单独的 JSON 模块(不同于 4.x)
  3. 包名为
    kong.unirest
    — 不是
    kong.unirest.core
    (后者属于 4.x)
  4. 单个 Maven 依赖 —
    unirest-java:3.14.5
    (不同于使用 BOM + core + module 的 4.x)
  5. Apache HttpClient 引擎 — 使用 Apache HttpClient 4(而不是 java.net.http.HttpClient)
  6. Socket 超时彼此独立 —
    socketTimeout()
    单独控制读取超时,与
    connectTimeout()
    分开
  7. 连接池调优 —
    concurrency(total, perRoute)
    可调整 Apache 的连接池
  8. 默认启用自动重试 —
    automaticRetries(true)
    会在 socket 错误时最多重试 4 次
  9. 支持单请求代理 —
    request.proxy(host, port)
    可用(4.x 中已移除)
  10. 支持 HostnameVerifier —
    hostnameVerifier(verifier)
    用于自定义 SSL 主机名验证
  11. 可使用关闭钩子 —
    addShutdownHook(true)
    注册 JVM 关闭钩子
  12. 默认启用系统代理属性 —
    useSystemProperties
    默认为
    true
    (不同于 4.x)
  13. Unirest 不支持 WebSocket — 使用 Apache HttpClient WebSocket 或专用库
  14. 不支持 SSE — 3.x 中不存在
    Unirest.sse()
  15. Mock 注册需要两个客户端 — MockClient 同时实现
    Client
    和
    AsyncClient

References

参考资料

Requests

请求

  • requests.md — Route params, query params, headers, auth, body types, file uploads, upload progress, async, paged requests, per-request proxy
  • requests.md — 路由参数、查询参数、请求头、身份验证、请求体类型、文件上传、上传进度、异步、分页请求、单请求代理

Responses

响应

  • responses.md — asEmpty/asString/asObject/asJson/asFile, GenericType, parsing errors, error object mapping, download progress, large responses, error handling
  • responses.md — asEmpty/asString/asObject/asJson/asFile、GenericType、解析错误、错误对象映射、下载进度、大型响应、错误处理

Configuration

配置

  • configuration.md — Full config options table, global interceptors, multiple configurations, object mappers, metrics, Apache-specific options
  • configuration.md — 完整配置项表、全局拦截器、多实例配置、对象映射器、指标、Apache 特有选项

Mocking

Mock

  • mocking.md — Static/instance mocks, multiple expects (scoring), verification, body matching, form params, POJO responses
  • mocking.md — 静态/实例 mock、多个预期请求(评分)、验证、请求体匹配、表单参数、POJO 响应

Caching

缓存

  • caching.md — Basic/advanced caching, custom cache implementations
  • caching.md — 基础/高级缓存、自定义缓存实现

Proxies

代理

  • proxies.md — Simple proxy, system properties, per-request proxy
  • proxies.md — 简单代理、系统属性、单请求代理