Package | Description |
---|---|
org.dromara.hutool.http.client |
HTTP请求客户端封装,请求过程如下:
Server
^ |
| v
Request Response
^ |
| v
ClientEngine
|
Modifier and Type | Method and Description |
---|---|
HttpDownloader |
HttpDownloader.header(Map<String,String> headers)
设置请求头
|
HttpDownloader |
HttpDownloader.header(String name,
String value)
设置请求头,多个请求头则多次调用
|
static HttpDownloader |
HttpDownloader.of(String url)
创建下载器
|
HttpDownloader |
HttpDownloader.setCloseEngine(boolean closeEngine)
设置是否关闭引擎,默认为true,即自动关闭引擎
|
HttpDownloader |
HttpDownloader.setConfig(ClientConfig config)
设置配置
|
HttpDownloader |
HttpDownloader.setEngine(ClientEngine engine)
设置引擎,用于自定义引擎
|
HttpDownloader |
HttpDownloader.setStreamProgress(StreamProgress streamProgress)
设置进度条
|
HttpDownloader |
HttpDownloader.setTimeout(int milliseconds)
设置超时
|
Copyright © 2025. All rights reserved.