Package com. drake. net. body
Types
NetRequestBody
Link copied to clipboard
class NetRequestBody(requestBody: RequestBody, progressListeners: ConcurrentLinkedQueue<ProgressListener>?) : RequestBody
Content copied to clipboard
NetResponseBody
Link copied to clipboard
class NetResponseBody(responseBody: ResponseBody, progressListeners: ConcurrentLinkedQueue<ProgressListener>?, complete: () -> Unit?) : ResponseBody
Content copied to clipboard
Functions
peekString
Link copied to clipboard
fun RequestBody.peekString(byteCount: Long = 1024 * 1024, discard: Boolean = false): String
Content copied to clipboard
fun ResponseBody.peekString(byteCount: Long = 1024 * 1024 * 4, discard: Boolean = false): String
Content copied to clipboard
toNetRequestBody
Link copied to clipboard
fun RequestBody.toNetRequestBody(listeners: ConcurrentLinkedQueue<ProgressListener>? = null): <ERROR CLASS>
Content copied to clipboard
toNetResponseBody
Link copied to clipboard
fun ResponseBody.toNetResponseBody(listeners: ConcurrentLinkedQueue<ProgressListener>? = null, complete: () -> Unit? = null): <ERROR CLASS>
Content copied to clipboard
value
Link copied to clipboard
将MultipartBody.Part.body作为字符串返回 如果MultipartBody.Part是文件类型则返回的是文件名称, 确定文件类型请参考MultipartBody.Part.isFile