1
0
mirror of https://github.com/square/okhttp.git synced 2025-07-29 17:41:17 +03:00

Replace MediaType.get(string) with string.toMediaType() (#5132)

This commit is contained in:
Jesse Wilson
2019-05-27 01:38:35 -04:00
committed by Yuri Schimke
parent 568c6813b1
commit 53ba4dd9ef
12 changed files with 67 additions and 57 deletions

View File

@ -21,6 +21,7 @@ import okhttp3.Callback
import okhttp3.Dns
import okhttp3.HttpUrl
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Protocol
import okhttp3.Request
@ -302,7 +303,7 @@ class DnsOverHttps internal constructor(builder: Builder) : Dns {
}
companion object {
val DNS_MESSAGE: MediaType = MediaType.get("application/dns-message")
val DNS_MESSAGE: MediaType = "application/dns-message".toMediaType()
const val MAX_RESPONSE_SIZE = 64 * 1024
private fun buildBootstrapClient(builder: Builder): Dns {