withAccept

fun OkHttpClient.withAccept(mediaTypes: List<MediaType>): OkHttpClient

Returns a new client that sends an Accept header listing mediaTypes on every request.

Parameters

mediaTypes

The media types to advertise as acceptable response formats.