类 MultipartBody
java.lang.Object
com.lark.oapi.okhttp.RequestBody
com.lark.oapi.okhttp.MultipartBody
An RFC 2387-compliant request body.
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final MediaTypeThe "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different.static final MediaTypeThis type is syntactically identical to "multipart/mixed", but the semantics are different.static final MediaTypeThe media-type multipart/form-data follows the rules of all multipart MIME data streams as outlined in RFC 2046.static final MediaTypeThe "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order.static final MediaTypeThis type is syntactically identical to "multipart/mixed", but the semantics are different. -
方法概要
修饰符和类型方法说明boundary()longReturns the number of bytes that will be written tosinkin a call toRequestBody.writeTo(com.lark.oapi.okio.BufferedSink), or -1 if that count is unknown.A combination oftype()andboundary().part(int index) parts()intsize()The number of parts in this multipart body.type()voidwriteTo(BufferedSink sink) Writes the content of this request tosink.
-
字段详细资料
-
MIXED
The "mixed" subtype of "multipart" is intended for use when the body parts are independent and need to be bundled in a particular order. Any "multipart" subtypes that an implementation does not recognize must be treated as being of subtype "mixed". -
ALTERNATIVE
The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, each of the body parts is an "alternative" version of the same information. -
DIGEST
This type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, in a digest, the defaultContent-Typevalue for a body part is changed from "text/plain" to "message/rfc822". -
PARALLEL
This type is syntactically identical to "multipart/mixed", but the semantics are different. In particular, in a parallel entity, the order of body parts is not significant. -
FORM
The media-type multipart/form-data follows the rules of all multipart MIME data streams as outlined in RFC 2046. In forms, there are a series of fields to be supplied by the user who fills out the form. Each field has a name. Within a given form, the names are unique.
-
-
方法详细资料
-
type
-
boundary
-
size
public int size()The number of parts in this multipart body. -
parts
-
part
-
contentType
A combination oftype()andboundary().- 指定者:
contentType在类中RequestBody
-
contentLength
从类复制的说明:RequestBodyReturns the number of bytes that will be written tosinkin a call toRequestBody.writeTo(com.lark.oapi.okio.BufferedSink), or -1 if that count is unknown.- 覆盖:
contentLength在类中RequestBody- 抛出:
IOException
-
writeTo
从类复制的说明:RequestBodyWrites the content of this request tosink.- 指定者:
writeTo在类中RequestBody- 抛出:
IOException
-