Companion

object Companion

Factories for creating NetworkSendResult instances.

Functions

Link copied to clipboard

A transport-failure result carrying errorMessage; statusCode is 0.

Link copied to clipboard
fun of(statusCode: Int, headers: Headers = Headers.EMPTY, body: ByteArray? = null, contentType: MediaType? = null): NetworkSendResult

A successful result with the given statusCode, and optional headers (default empty), body (default null), and contentType (default null).