- java.lang.Object
-
- develop.toolkit.base.struct.http.HttpClientSender
-
public final class HttpClientSender extends Object
Http发送器- 作者:
- qiushui on 2020-09-10.
-
-
构造器概要
构造器 构造器 说明 HttpClientSender(HttpClient httpClient, String method, String url)
-
方法概要
-
-
-
构造器详细资料
-
HttpClientSender
public HttpClientSender(HttpClient httpClient, String method, String url)
-
-
方法详细资料
-
header
public HttpClientSender header(String header, String value)
-
headers
public HttpClientSender headers(Map<String,String> headers)
-
headerAuthorization
public HttpClientSender headerAuthorization(String value)
-
headerContentType
public HttpClientSender headerContentType(String value)
-
parameter
public HttpClientSender parameter(String parameter, Object value)
-
parameters
public HttpClientSender parameters(Map<String,Object> parameters)
-
readTimeout
public HttpClientSender readTimeout(Duration readTimeout)
-
debugLabel
public HttpClientSender debugLabel(String debugLabel)
-
onlyPrintFailed
public HttpClientSender onlyPrintFailed(boolean onlyPrintFailed)
-
bodyJson
public HttpClientSender bodyJson(String json)
-
bodyXml
public HttpClientSender bodyXml(String xml)
-
bodyText
public HttpClientSender bodyText(String text)
-
bodyMultiPartFormData
public HttpClientSender bodyMultiPartFormData(MultiPartFormDataBody multiPartFormDataBody)
-
bodyFormUrlencoded
public HttpClientSender bodyFormUrlencoded(FormUrlencodedBody formUrlencodedBody)
-
bodyBytes
public HttpClientSender bodyBytes(byte[] bytes)
-
download
public void download(Path path, OpenOption... openOptions)
-
send
public HttpClientReceiver<String> send()
-
send
public <BODY> HttpClientReceiver<BODY> send(SenderHandler<BODY> senderHandler)
核心发送逻辑- 类型参数:
BODY- 响应内容- 参数:
senderHandler- 发送器扩展逻辑- 返回:
- receiver
-
-