Functions
Link copied to clipboard
expect fun BufferedSource.asResponseBody(contentType: MediaType? = null, contentLength: Long = -1L): ResponseBody
Returns a new response body that transmits this source.
actual fun BufferedSource.asResponseBody(contentType: MediaType?, contentLength: Long): ResponseBody
actual fun BufferedSource.asResponseBody(contentType: MediaType?, contentLength: Long): ResponseBody
Link copied to clipboard
Link copied to clipboard
Returns a new response body that transmits this byte array.
Returns a new response body that transmits this string. If contentType is non-null and has a charset other than utf-8 the behaviour differs by platform.
Returns a new response body that transmits this byte string.