Encoder

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.