From bf09e96e04761b555e0602e4c768d20c7f8f1b99 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Wed, 21 Dec 2022 18:02:30 +0100 Subject: [PATCH] android: more logging --- .../src/main/java/com/reicast/emulator/emu/HttpClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/HttpClient.java b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/HttpClient.java index 2b82eb9f4..905e1a80e 100644 --- a/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/HttpClient.java +++ b/shell/android-studio/flycast/src/main/java/com/reicast/emulator/emu/HttpClient.java @@ -81,13 +81,17 @@ public class HttpClient { try { if (httpClient == null) httpClient = HttpClients.createDefault(); + Log.i("flycast", "POST to '" + urlString + "'"); HttpPost httpPost = new HttpPost(urlString); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); for (int i = 0; i < fieldNames.length; i++) { - if (contentTypes[i].isEmpty()) + if (contentTypes[i].isEmpty()) { + Log.i("flycast", "POST field: " + fieldNames[i] + "=" + fieldValues[i]); builder.addTextBody(fieldNames[i], fieldValues[i], ContentType.TEXT_PLAIN); + } else { File file = new File(fieldValues[i]); + Log.i("flycast", "POST file: " + fieldNames[i] + "=" + file.getAbsolutePath() + " (" + ContentType.create(contentTypes[i]) + ") " + (file.exists() ? " exists" : "not found")); builder.addBinaryBody(fieldNames[i], file, ContentType.create(contentTypes[i]), file.getName()); } }