public class ApacheUpload extends BaseApacheRequest
client, request
body, bodyLen, bodyOffset, charset, contentType, cookies, DEFAULT_USERAGENT, formParts, headers, ignoreHeaders, method, queryParams, queryString, queryStringEncode, url
Constructor and Description |
---|
ApacheUpload(String url) |
ApacheUpload(String url,
org.apache.http.impl.client.CloseableHttpClient client) |
Modifier and Type | Method and Description |
---|---|
ApacheResponse |
await()
同步执行
|
BaseHttpRequest |
body(byte[] body) |
BaseHttpRequest |
body(byte[] body,
int offset,
int len) |
BaseHttpRequest |
body(String body) |
BaseHttpRequest |
contentType(HttpContentType contentType) |
BaseHttpRequest |
contentType(String contentType) |
protected org.apache.http.HttpEntity |
getEntry()
获取 entity
|
boolean |
isDone() |
ApacheUpload |
method(HttpMethod method) |
ApacheUpload |
method(String method) |
ApacheUpload |
part(HttpUploadPart part)
上传单文件
|
ApacheUpload |
parts(Collection<HttpUploadPart> parts)
上传多文件
|
buildRequest, cancel, client, getClient, getRequestByMethod
charset, cookie, cookies, format, format, formPart, formParts, getBody, getBodyLen, getBodyOffset, getCharset, getContentType, getCookies, getFormParts, getHeaders, getIgnoreHeaders, getMethod, getQueryParams, getQueryString, getUrl, header, headers, ignoreHeader, ignoreHeaders, ignoreHeaders, isNoBodyRequest, isQueryStringEncode, queryParam, queryParams, queryStringEncode, referer, toString, url, userAgent
public ApacheUpload(String url)
public ApacheUpload(String url, org.apache.http.impl.client.CloseableHttpClient client)
public ApacheUpload method(HttpMethod method)
method
in class BaseHttpRequest
public ApacheUpload method(String method)
method
in class BaseHttpRequest
public BaseHttpRequest body(String body)
body
in class BaseHttpRequest
public BaseHttpRequest body(byte[] body)
body
in class BaseHttpRequest
public BaseHttpRequest body(byte[] body, int offset, int len)
body
in class BaseHttpRequest
public BaseHttpRequest contentType(String contentType)
contentType
in class BaseHttpRequest
public BaseHttpRequest contentType(HttpContentType contentType)
contentType
in class BaseHttpRequest
public ApacheUpload part(HttpUploadPart part)
part
- ignorepublic ApacheUpload parts(Collection<HttpUploadPart> parts)
parts
- ignoreprotected org.apache.http.HttpEntity getEntry()
BaseApacheRequest
getEntry
in class BaseApacheRequest
public ApacheResponse await()
Awaitable
public boolean isDone()
Copyright © 2024. All rights reserved.