| Package | Description | 
|---|---|
| cn.hutool.ai.core | AI相关基础类 | 
| cn.hutool.http | Hutool-http针对JDK的HttpUrlConnection做一层封装,简化了HTTPS请求、文件上传、Cookie记忆等操作,使Http请求变得无比简单。 | 
| cn.hutool.http.webservice | Webservice客户端封装实现 | 
| Modifier and Type | Method and Description | 
|---|---|
| protected HttpResponse | BaseAIService. sendFormData(String endpoint,
            Map<String,Object> paramMap)发送表单请求 | 
| protected HttpResponse | BaseAIService. sendGet(String endpoint)发送Get请求 | 
| protected HttpResponse | BaseAIService. sendPost(String endpoint,
        String paramJson)发送Post请求 | 
| Modifier and Type | Method and Description | 
|---|---|
| HttpResponse | HttpResponse. body(byte[] bodyBytes)设置主体字节码 需在此方法调用前使用charset方法设置编码,否则使用默认编码UTF-8 | 
| HttpResponse | HttpRequest. execute()执行Reuqest请求 | 
| HttpResponse | HttpRequest. execute(boolean isAsync)执行Reuqest请求 | 
| HttpResponse | HttpRequest. executeAsync()异步请求 异步请求后获取的 HttpResponse为异步模式,执行完此方法后发送请求到服务器,但是并不立即读取响应内容。 | 
| HttpResponse | HttpResponse. sync()同步 如果为异步状态,则暂时不读取服务器中响应的内容,而是持有Http链接的 InputStream。 | 
| Modifier and Type | Method and Description | 
|---|---|
| GlobalInterceptor | GlobalInterceptor. addResponseInterceptor(HttpInterceptor<HttpResponse> interceptor)设置拦截器,用于在响应读取后完成编辑或读取 | 
| HttpConfig | HttpConfig. addResponseInterceptor(HttpInterceptor<HttpResponse> interceptor)设置拦截器,用于在请求前重新编辑请求 | 
| HttpRequest | HttpRequest. addResponseInterceptor(HttpInterceptor<HttpResponse> interceptor)设置拦截器,用于在请求前重新编辑请求 | 
| void | HttpRequest. then(Consumer<HttpResponse> consumer)执行Request请求后,对响应内容后续处理 处理结束后关闭连接 | 
| <T> T | HttpRequest. thenFunction(Function<HttpResponse,T> function)执行Request请求后,对响应内容后续处理 处理结束后关闭连接 | 
| Constructor and Description | 
|---|
| HttpInputStream(HttpResponse response)构造 | 
| Modifier and Type | Method and Description | 
|---|---|
| HttpResponse | SoapClient. sendForResponse()发送请求,获取异步响应 | 
Copyright © 2025. All rights reserved.