Package | Description |
---|---|
org.voovan.http.client |
Modifier and Type | Field and Description |
---|---|
HttpClient |
AsyncHandler.httpClient |
Modifier and Type | Method and Description |
---|---|
HttpClient |
HttpClient.addPart(Part part)
设置POST多段请求
类似 Form 的 Actiong="POST" enctype="multipart/form-data"
|
HttpClient |
HttpClientPool.getHttpClient() |
HttpClient |
HttpClientPool.getHttpClient(long timeout,
TimeUnit timeUnit) |
HttpClient |
HttpClient.initHeader()
重新初始化 http 头
|
static HttpClient |
HttpClient.newInstance(String urlString)
静态构造方法
默认字符集 UTF-8, 默认超时时间 5s
|
static HttpClient |
HttpClient.newInstance(String urlString,
int timeout)
静态构造方法
默认超时时间 5s
|
static HttpClient |
HttpClient.newInstance(String urlString,
String charset)
静态构造方法
默认超时时间 5s
|
static HttpClient |
HttpClient.newInstance(String urlString,
String charset,
int timeout)
静态构造方法
|
HttpClient |
HttpClient.putHeader(String name,
String value)
设置请求头
|
HttpClient |
HttpClient.putParameters(String name,
String value)
设置请求参数
|
HttpClient |
HttpClient.setBodyType(Request.RequestType bodyType)
设置报文形式
|
HttpClient |
HttpClient.setData(byte[] data)
设置请求内容
|
HttpClient |
HttpClient.setData(String data)
设置请求内容
|
HttpClient |
HttpClient.setData(String contentType,
String data)
设置请求内容
|
HttpClient |
HttpClient.setData(String contentType,
String data,
String charset)
设置请求内容
|
HttpClient |
HttpClient.setJsonData(Object data)
设置请求内容
|
HttpClient |
HttpClient.setJsonData(Object data,
String charset)
设置请求内容
|
HttpClient |
HttpClient.setMethod(String method)
设置请求方法
|
HttpClient |
HttpClient.setParamInUrl(boolean paramInUrl)
设置是否将参数封装在 URL 中, 仅在 POST 等请求中有效
|
Modifier and Type | Method and Description |
---|---|
ObjectPool<HttpClient> |
HttpClientPool.getPool() |
Modifier and Type | Method and Description |
---|---|
void |
HttpClientPool.restitution(HttpClient httpClient) |
Constructor and Description |
---|
AsyncHandler(HttpClient httpClient) |
HttpClientFilter(HttpClient httpClient) |
WebSocketHandler(HttpClient httpClient,
WebSocketSession webSocketSession,
WebSocketRouter webSocketRouter)
构造函数
|
Copyright © 2020 Voovan. All rights reserved.