1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

DeepL: base URI

This commit is contained in:
M66B 2021-05-18 07:10:26 +02:00
parent 349ce9e99c
commit e476fe04e4

View file

@ -316,6 +316,7 @@ public class FragmentCompose extends FragmentBase {
private static final int REQUEST_PERMISSION = 15;
private static final int DEEPL_TIMEOUT = 20; // seconds
private static final String DEEPL_BASE_URI = "https://api-free.deepl.com/v2/";
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt");
@ -2016,7 +2017,7 @@ public class FragmentCompose extends FragmentBase {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String deepl = prefs.getString("deepl", null);
URL url = new URL("https://api-free.deepl.com/v2/translate?auth_key=" + deepl);
URL url = new URL(DEEPL_BASE_URI + "translate?auth_key=" + deepl);
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);