登录 注册
开发者工具网络与基础设施安全与隐私工具 ahcasyncasynchttpclienthttp-clientjavanetty
6,397
Stars
1,591
Forks
339
Watchers
99
Open Issues
Apache-2.0
许可证
Java
语言
2011-03-07
创建时间
2026-11-09
最近更新

项目能做什么

面向 JVM 的异步非阻塞 HTTP 与 WebSocket 客户端库。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Async Http Client

[![Build](https://github.com/AsyncHttpClient/async-http-client/actions/workflows/builds.yml/badge.svg)](https://github.com/AsyncHttpClient/async-http-client/actions/workflows/builds.yml)
[![Maven Central](https://img.shields.io/maven-central/v/org.asynchttpclient/async-http-client)](https://central.sonatype.com/artifact/org.asynchttpclient/async-http-client)
[![License](https://img.shields.io/github/license/AsyncHttpClient/async-http-client)](https://www.apache.org/licenses/LICENSE-2.0)

AsyncHttpClient (AHC) is a high-performance, asynchronous HTTP client for Java
built on top of [Netty](https://github.com/netty/netty).
It supports HTTP/1.1, HTTP/2, and WebSocket protocols.

## Table of Contents

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [HTTP Requests](#http-requests)
- [Handling Responses](#handling-responses)
- [HTTP/2](#http2)
- [WebSocket](#websocket)
- [Authentication](#authentication)
- [Proxy Support](#proxy-support)
- [Community](#community)
- [License](#license)

## Features

- **HTTP/2 with multiplexing** — enabled by default over TLS via ALPN,
  with connection multiplexing and GOAWAY handling
- **HTTP/1.1 and HTTP/1.0** — connection pooling and keep-alive
- **WebSocket** — text, binary, and ping/pong frame support
- **Asynchronous API** — non-blocking I/O with `ListenableFuture`
  and `CompletableFuture`
- **Compression** — automatic gzip, deflate, Brotli, and Zstd decompression
- **Authentication** — Basic, Digest, NTLM, SPNEGO/Kerberos, and SCRAM-SHA-256
- **Proxy** — HTTP, SOCKS4, and SOCKS5 with CONNECT tunneling
- **Native transports** — optional Epoll, KQueue, and io_uring
- **Request/response filters** — intercept and transform at each stage
- **Cookie management** — RFC 6265-compliant cookie store
- **Multipart uploads** — file, byte array, input stream, and string parts
- **Resumable downloads** — built-in `ResumableIOExceptionFilter`

## Requirements

Java 11+

## Installation

**Maven:**

```xml
<dependency>
    <groupId>org.asynchttpclient</groupId>
    <artifactId>async-http-client</artifactId>
    <version>3.0.14</version>
</dependency>
```

**Gradle:**

```groovy
implementation 'org.asynchttpclient:async-http-client:3.0.14'
```

<details>
<summary><b>Optional: Native Transport</b></summary>

For lower-latency I/O on Linux, add a native transport dependency:

```xml
<!-- Epoll (Linux) -->
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-epoll</artifactId>
    <classifier>linux-x86_64</classifier>
</dependency>

<!-- io_uring (Linux) -->
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-io_uring</artifactId>
    <classifier>linux-x86_64</classifier>
</dependency>
```

Then enable in config:

```java
AsyncHttpClient client = asyncHttpClient(config().setUseNativeTransport(true));
```

</details>

<details>
<summary><b>Optio
阅读完整原文

商业机会分析 规则生成(AI 未配置)

综合评分 42.5 分。该项目在“个人可实施性”维度得 37 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 async-http-client 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
mikeal/bent 中文介绍暂未生成
Functional JS HTTP client (Node.js & Fetch) w/ async await
2,179 JavaScript
http-rs/surf 中文介绍暂未生成
Fast and friendly HTTP client framework for async Rust
1,505 Rust
Cylix/cpp_redis 中文介绍暂未生成
C++11 Lightweight Redis client: async, thread-safe, no depen
1,256 C++
apify/mcpc 中文介绍暂未生成
The most compatible MCP CLI client. Supports: tools, resourc
1,098 TypeScript
swift-server/async-http-client 中文介绍暂未生成
HTTP client library built on SwiftNIO
1,085 Swift
eBay/restcommander 中文介绍暂未生成
Fast Parallel Async HTTP client as a Service to monitor and
899 Java
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2011-03-07,近 30 天仍在推送,发布过 22 个 Release
社区活跃Star 6,397 / Fork 1,591 / Issue 99(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/AsyncHttpClient/async-http-client.git
cd async-http-client
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。