1
0
mirror of https://github.com/square/okhttp.git synced 2025-07-31 05:04:26 +03:00

Add parse overload which fails on invalid inputs

This commit is contained in:
Jake Wharton
2018-07-05 22:09:40 -04:00
parent d45f517f1f
commit 36f4fd04f7
24 changed files with 191 additions and 124 deletions

View File

@ -53,8 +53,8 @@ import okio.ByteString;
* Until then, expect API and behavior changes when you update your OkHttp dependency.</strong>
*/
public class DnsOverHttps implements Dns {
public static final MediaType DNS_MESSAGE = MediaType.parse("application/dns-message");
public static final MediaType UDPWIREFORMAT = MediaType.parse("application/dns-udpwireformat");
public static final MediaType DNS_MESSAGE = MediaType.get("application/dns-message");
public static final MediaType UDPWIREFORMAT = MediaType.get("application/dns-udpwireformat");
public static final int MAX_RESPONSE_SIZE = 64 * 1024;
private final OkHttpClient client;
private final HttpUrl url;