Package org.miaixz.bus.http
Class Httpx
java.lang.Object
org.miaixz.bus.http.Httpx
-
Constructor Summary
ConstructorsConstructorDescriptionHttpx()提供返回实例的静态方法Httpx(int connTimeout, int readTimeout, int writeTimeout) 构建一个自定义配置的 HTTP Client 类Httpx(int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration) 构建一个自定义配置的 HTTP Client 类Httpx(X509TrustManager x509TrustManager) 提供返回实例的静态方法Httpx(DnsX dns, HttpProxy httpProxy, int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration) 构建一个自定义配置的 HTTP Client 类Httpx(DnsX dns, HttpProxy httpProxy, int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration, SSLSocketFactory sslSocketFactory, X509TrustManager x509TrustManager, HostnameVerifier hostnameVerifier) 构建一个自定义配置的 HTTP Client 类 -
Method Summary
Modifier and TypeMethodDescriptionstatic String简单的 GET 请求 使用默认编码 UTF-8static String异步get请求,回调static String简单的 GET 请求 使用自定义编码static String带查询参数 GET 请求 使用默认编码 UTF-8static String带查询参数 GET 请求 使用默认编码 UTF-8static String带查询参数 GET 请求 使用自定义编码static void异步处理的GET请求,自定义请求类型static Stringform 方式 POST 请求static String带查询参数 POST 请求 使用默认编码 UTF-8static String带查询参数 POST 请求 使用自定义编码static Stringstatic Stringform 方式 POST 请求 application/x-www-form-urlencodedstatic String带查询参数 POST 请求 使用默认编码 UTF-8static String带查询参数 POST 请求 使用自定义编码static String表单提交带文件上传static String带查询参数 POST 请求 使用自定义编码static String带查询参数 POST 请求 使用自定义编码static Stringpost(String url, Map<String, String> formMap, Map<String, String> headerMap, String mediaType, String charset) 带查询参数 POST 请求 使用自定义编码static void异步处理的POST请求,自定义请求类型
-
Constructor Details
-
Httpx
public Httpx()提供返回实例的静态方法 -
Httpx
-
Httpx
public Httpx(int connTimeout, int readTimeout, int writeTimeout) 构建一个自定义配置的 HTTP Client 类- Parameters:
connTimeout- 连接readTimeout- 读取writeTimeout- 输出
-
Httpx
public Httpx(int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration) 构建一个自定义配置的 HTTP Client 类- Parameters:
connTimeout- 连接readTimeout- 读取writeTimeout- 输出maxRequests- 最大请求maxRequestsPerHost- 主机最大请求maxIdleConnections- 最大连接keepAliveDuration- 链接时长
-
Httpx
public Httpx(DnsX dns, HttpProxy httpProxy, int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration) 构建一个自定义配置的 HTTP Client 类- Parameters:
dns- DNS 信息httpProxy- 代理信息connTimeout- 连接readTimeout- 读取writeTimeout- 输出maxRequests- 最大请求maxRequestsPerHost- 主机最大请求maxIdleConnections- 最大连接keepAliveDuration- 链接时长
-
Httpx
public Httpx(DnsX dns, HttpProxy httpProxy, int connTimeout, int readTimeout, int writeTimeout, int maxRequests, int maxRequestsPerHost, int maxIdleConnections, int keepAliveDuration, SSLSocketFactory sslSocketFactory, X509TrustManager x509TrustManager, HostnameVerifier hostnameVerifier) 构建一个自定义配置的 HTTP Client 类- Parameters:
dns- DNS 信息httpProxy- 代理信息connTimeout- 连接readTimeout- 读取writeTimeout- 输出maxRequests- 最大请求maxRequestsPerHost- 主机最大请求maxIdleConnections- 最大连接keepAliveDuration- 链接时长sslSocketFactory- 抽象类,扩展自SocketFactory, SSLSocket的工厂x509TrustManager- 证书信任管理器hostnameVerifier- 主机名校验信息
-
-
Method Details
-
get
-
get
-
get
-
get
-
get
-
get
-
get
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-
post
-