Closed
Description
I'm using version 5.0.0-alpha14, and found that we have a public commonEmptyRequestBody
in -UtilCommon.kt
.
val commonEmptyHeaders: Headers = Headers.headersOf()
val commonEmptyRequestBody: RequestBody = EMPTY_BYTE_ARRAY.toRequestBody()
val commonEmptyResponse: ResponseBody = EMPTY_BYTE_ARRAY.toResponseBody()
I think we can have them internal
and public them like this:
// with @JvmField
Headers.Empty
RequestBody.Empty
ResponseBody.Empty
This type might fit Kotlin more. Also we can easier access them in Java like Headers.Companion.Empty