Companion

object Companion

Functions

Link copied to clipboard
fun Decoder(moshi: Moshi): BodyAdapter.Decoder

Creates a decoder that uses the given Moshi instance for decoding objects and is compatible with application/json.

fun Decoder(moshi: Moshi, vararg mediaTypes: MediaType): BodyAdapter.Decoder

Creates a decoder that uses the given Moshi instance for decoding objects and is compatible with the given media types.

Link copied to clipboard
fun Encoder(moshi: Moshi): BodyAdapter.Encoder

Creates an encoder that uses the given Moshi instance for encoding objects and is compatible with application/json.

fun Encoder(moshi: Moshi, vararg mediaTypes: MediaType): BodyAdapter.Encoder

Creates an encoder that uses the given Moshi instance for encoding objects and is compatible with the given media types.