mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
Added support for User-Agent Client Hints
This commit is contained in:
@@ -254,7 +254,7 @@ public class DeepL {
|
||||
connection.setDoOutput(true);
|
||||
connection.setReadTimeout(DEEPL_TIMEOUT * 1000);
|
||||
connection.setConnectTimeout(DEEPL_TIMEOUT * 1000);
|
||||
connection.setRequestProperty("User-Agent", WebViewEx.getUserAgent(context));
|
||||
ConnectionHelper.setUserAgent(context, connection);
|
||||
connection.setRequestProperty("Accept", "*/*");
|
||||
connection.setRequestProperty("Content-Length", Integer.toString(request.length()));
|
||||
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||
@@ -315,7 +315,7 @@ public class DeepL {
|
||||
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
|
||||
connection.setReadTimeout(DEEPL_TIMEOUT * 1000);
|
||||
connection.setConnectTimeout(DEEPL_TIMEOUT * 1000);
|
||||
connection.setRequestProperty("User-Agent", WebViewEx.getUserAgent(context));
|
||||
ConnectionHelper.setUserAgent(context, connection);
|
||||
connection.connect();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user