diff --git a/app/src/main/java/fr/ynerant/tarot/Game.java b/app/src/main/java/fr/ynerant/tarot/Game.java index ab6d8b6..1a33018 100644 --- a/app/src/main/java/fr/ynerant/tarot/Game.java +++ b/app/src/main/java/fr/ynerant/tarot/Game.java @@ -268,7 +268,7 @@ public class Game { @Override public void run() { try { - URL url = new URL("http://ynerant.fr/tarot/game.php"); + URL url = new URL("https://ynerant.fr/tarot/game.php"); final HttpURLConnection co = (HttpURLConnection) url.openConnection(); co.setRequestMethod("POST"); co.setRequestProperty("token", PreferenceManager.getDefaultSharedPreferences(MainActivity.INSTANCE).getString("token", null)); diff --git a/app/src/main/java/fr/ynerant/tarot/Player.java b/app/src/main/java/fr/ynerant/tarot/Player.java index a49a09d..fc53c25 100644 --- a/app/src/main/java/fr/ynerant/tarot/Player.java +++ b/app/src/main/java/fr/ynerant/tarot/Player.java @@ -9,6 +9,8 @@ import androidx.annotation.NonNull; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; +import org.apache.commons.io.IOUtils; + import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; @@ -65,7 +67,7 @@ public class Player { @Override public void run() { try { - URL url = new URL("http://ynerant.fr/tarot/player.php"); + URL url = new URL("https://ynerant.fr/tarot/player.php"); final HttpURLConnection co = (HttpURLConnection) url.openConnection(); co.setRequestMethod("POST"); co.setRequestProperty("token", PreferenceManager.getDefaultSharedPreferences(MainActivity.INSTANCE).getString("token", null)); diff --git a/app/src/main/java/fr/ynerant/tarot/ui/home/HomeFragment.java b/app/src/main/java/fr/ynerant/tarot/ui/home/HomeFragment.java index 620ab24..b7595fb 100644 --- a/app/src/main/java/fr/ynerant/tarot/ui/home/HomeFragment.java +++ b/app/src/main/java/fr/ynerant/tarot/ui/home/HomeFragment.java @@ -63,7 +63,7 @@ public class HomeFragment extends Fragment { public void run() { try { Looper.prepare(); - URL url = new URL("http://ynerant.fr/tarot/check_token.php"); + URL url = new URL("https://ynerant.fr/tarot/check_token.php"); final HttpURLConnection co = (HttpURLConnection) url.openConnection(); co.setRequestMethod("POST"); co.setRequestProperty("token", token.getText().toString());