public class OkAsyncUpload extends BaseOkRequest implements Asyncable<Consumer<OkResponse>>
call, client, request, tagbody, bodyLen, bodyOffset, charset, contentType, cookies, DEFAULT_USERAGENT, formParts, headers, ignoreHeaders, method, queryParams, queryString, queryStringEncode, url| Constructor and Description |
|---|
OkAsyncUpload(String url) |
OkAsyncUpload(String url,
okhttp3.OkHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
async(Consumer<OkResponse> callback)
异步执行
|
OkAsyncUpload |
asyncFailThrows() |
OkAsyncUpload |
asyncFailThrows(boolean asyncFailThrows) |
BaseHttpRequest |
body(byte[] body) |
BaseHttpRequest |
body(byte[] body,
int offset,
int len) |
BaseHttpRequest |
body(String body) |
BaseHttpRequest |
contentType(HttpContentType contentType) |
BaseHttpRequest |
contentType(String contentType) |
OkAsyncUpload |
method(HttpMethod method) |
OkAsyncUpload |
method(String method) |
OkAsyncUpload |
part(HttpUploadPart part)
上传单文件
|
OkAsyncUpload |
parts(Collection<HttpUploadPart> parts)
上传多文件
|
protected void |
setBody(okhttp3.Request.Builder requestBuilder)
设置body
|
buildRequest, cancel, client, getCall, getClient, getRequest, getRequestMessage, getTag, setMultipartBody, tagcharset, 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, userAgentpublic OkAsyncUpload(String url)
public OkAsyncUpload(String url, okhttp3.OkHttpClient client)
public OkAsyncUpload asyncFailThrows(boolean asyncFailThrows)
public OkAsyncUpload asyncFailThrows()
public OkAsyncUpload method(HttpMethod method)
method in class BaseHttpRequestpublic OkAsyncUpload method(String method)
method in class BaseHttpRequestpublic BaseHttpRequest body(String body)
body in class BaseHttpRequestpublic BaseHttpRequest body(byte[] body)
body in class BaseHttpRequestpublic BaseHttpRequest body(byte[] body, int offset, int len)
body in class BaseHttpRequestpublic BaseHttpRequest contentType(String contentType)
contentType in class BaseHttpRequestpublic BaseHttpRequest contentType(HttpContentType contentType)
contentType in class BaseHttpRequestpublic OkAsyncUpload part(HttpUploadPart part)
part - ignorepublic OkAsyncUpload parts(Collection<HttpUploadPart> parts)
parts - ignoreprotected void setBody(okhttp3.Request.Builder requestBuilder)
BaseOkRequestsetBody in class BaseOkRequestrequestBuilder - builderpublic void async(Consumer<OkResponse> callback)
Asyncableasync in interface Asyncable<Consumer<OkResponse>>callback - 异步处理器Copyright © 2025. All rights reserved.