# Package com.drake.net.body

## Types

NetRequestBody
Link copied to clipboard
class NetRequestBody(body: RequestBody, progressListeners: ConcurrentLinkedQueue<ProgressListener>?) : RequestBody
Content copied to clipboard
NetResponseBody
Link copied to clipboard
class NetResponseBody(body: ResponseBody, progressListeners: ConcurrentLinkedQueue<ProgressListener>?, complete: () -> Unit?) : ResponseBody
Content copied to clipboard

## Functions

fileName
Link copied to clipboard
fun MultipartBody.Part.fileName(): String?
Content copied to clipboard
获取Content-Disposition里面的filename属性值 可以此来判断是否为文件类型
name
Link copied to clipboard
fun MultipartBody.Part.name(): String?
Content copied to clipboard
获取Content-Disposition里面的字段名称
peekBytes
Link copied to clipboard
fun RequestBody.peekBytes(byteCount: Long = 1024 * 1024): ByteString
Content copied to clipboard
复制一段指定长度的字符串内容
fun ResponseBody.peekBytes(byteCount: Long = 1024 * 1024): ByteString
Content copied to clipboard
复制一段指定长度的字符串内容
toNetRequestBody
Link copied to clipboard
fun RequestBody.toNetRequestBody(listeners: ConcurrentLinkedQueue<ProgressListener>? = null): NetRequestBody
Content copied to clipboard
toNetResponseBody
Link copied to clipboard
fun ResponseBody.toNetResponseBody(listeners: ConcurrentLinkedQueue<ProgressListener>? = null, complete: () -> Unit? = null): NetResponseBody
Content copied to clipboard
value
Link copied to clipboard
fun MultipartBody.Part.value(): String?
Content copied to clipboard
将MultipartBody.Part.body作为字符串返回 如果MultipartBody.Part有指定fileName那么视为文件类型将返回fileName值而不是文件内容