- 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, String value)
-
parameters
public HttpClientSender parameters(Map<String,String> 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)
-
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) throws IOException
- 抛出:
IOException
-
downloadQuietly
public void downloadQuietly(Path path, OpenOption... openOptions)
-
send
public HttpClientReceiver<String> send() throws IOException
- 抛出:
IOException
-
sendQuietly
public Optional<HttpClientReceiver<String>> sendQuietly()
-
sendQuietly
public <BODY> Optional<HttpClientReceiver<BODY>> sendQuietly(SenderHandler<BODY> senderHandler)
-
send
public <BODY> HttpClientReceiver<BODY> send(SenderHandler<BODY> senderHandler) throws IOException
- 抛出:
IOException
-
-