ResponseBody

interface ResponseBody

Represents a Http raw response body if appropriate for the corresponding method.

Functions

Link copied to clipboard
abstract fun bytes(): ByteArray

A convenience API that constructs a ByteArray constructed from the underlying byteStream.

Link copied to clipboard
abstract fun byteStream(): InputStream

The underlying response Stream from which data can be read

Link copied to clipboard
abstract fun contentLength(): Long

Returns the number of bytes in that will returned by bytes, or byteStream, or -1 if unknown.

Link copied to clipboard
abstract fun contentType(): String

The Content-Type as returned from the Response Header