public class OkUpload extends BaseOkRequest implements Awaitable<OkResponse>
call, client, request, tagbody, bodyLen, bodyOffset, charset, contentType, cookies, DEFAULT_USERAGENT, formParts, headers, ignoreHeaders, method, queryParams, queryString, queryStringEncode, url| Constructor and Description |
|---|
OkUpload(String url) |
OkUpload(String url,
okhttp3.OkHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
OkResponse |
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) |
boolean |
isDone() |
OkUpload |
method(HttpMethod method) |
OkUpload |
method(String method) |
OkUpload |
part(HttpUploadPart part)
上传单文件
|
OkUpload |
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 OkUpload(String url)
public OkUpload(String url, okhttp3.OkHttpClient client)
public OkUpload method(HttpMethod method)
method in class BaseHttpRequestpublic OkUpload 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 OkUpload part(HttpUploadPart part)
part - ignorepublic OkUpload parts(Collection<HttpUploadPart> parts)
parts - ignoreprotected void setBody(okhttp3.Request.Builder requestBuilder)
BaseOkRequestsetBody in class BaseOkRequestrequestBuilder - builderpublic OkResponse await()
Awaitableawait in interface Awaitable<OkResponse>public boolean isDone()
Copyright © 2025. All rights reserved.