feat: send accept language header

This commit is contained in:
Asnxthaony 2020-05-24 14:54:07 +08:00 committed by GitHub
parent 7c510f9fb8
commit e6d11fe9a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ package org.jackhuang.hmcl.util.io;
import java.io.*;
import java.net.*;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
@ -59,6 +60,7 @@ public final class NetworkUtils {
connection.setUseCaches(false);
connection.setConnectTimeout(15000);
connection.setReadTimeout(15000);
connection.setRequestProperty("Accept-Language", Locale.getDefault().toString());
return connection;
}