toHttpBody

Convert a ByteArray into an HttpBody


Convert a String into an HttpBody


fun <Error class: unknown class>.toHttpBody(): HttpBody

Convert a ByteStream to the equivalent HttpBody variant


fun <Error class: unknown class>.toHttpBody(contentLength: Long? = null): HttpBody

Convert a SdkByteReadChannel to an HttpBody

Parameters

contentLength

the total content length of the channel if known


fun <Error class: unknown class>.toHttpBody(contentLength: Long? = null): HttpBody

Convert an SdkSource to an HttpBody

Parameters

contentLength

the total content length of the source, if known