JakeWharton/retrofit2-kotlinx-serialization-converter

Add default param to asConverterFactory

xanscale opened this issue · 1 comments

the media type for json body are standard and i think could be set as default

fun StringFormat.asConverterFactory(contentType: MediaType): Converter.Factory
to
fun StringFormat.asConverterFactory(contentType: MediaType = "application/json".toMediaType()): Converter.Factory

The format is unknown. JSON is only one of many text-based formats that you may be using (XML, YAML, TOML, CSV, etc.).