diff --git a/.idea/misc.xml b/.idea/misc.xml
index 33952c6..503aca7 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -55,7 +55,7 @@
-
+
diff --git a/app/src/main/java/org/communiquons/android/comunic/client/crashreporter/CrashReporter.java b/app/src/main/java/org/communiquons/android/comunic/client/crashreporter/CrashReporter.java
index f169213..6e5bc1e 100644
--- a/app/src/main/java/org/communiquons/android/comunic/client/crashreporter/CrashReporter.java
+++ b/app/src/main/java/org/communiquons/android/comunic/client/crashreporter/CrashReporter.java
@@ -46,6 +46,14 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
*/
private static final int API_CONNEXION_TIMEOUT = 3000;
+ /**
+ * Enable server response reading (debug only)
+ *
+ * Note: On some situations, it might be also required to enable this option on production
+ * environment.
+ */
+ private static final boolean API_READ_RESPONSE = true;
+
/**
* Method used to connect to the api
*/
@@ -284,7 +292,7 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
//Setup a few settings
conn.setRequestMethod(API_CONNEXION_METHOD);
conn.setDoOutput(true);
- conn.setDoInput(false);
+ conn.setDoInput(API_READ_RESPONSE);
conn.setConnectTimeout(API_CONNEXION_TIMEOUT);
conn.setChunkedStreamingMode(0);
@@ -299,6 +307,17 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
writer.close();
os.close();
+ //Read response if required
+ if(API_READ_RESPONSE){
+
+ //Read the response and return it immediately
+ InputStream is = conn.getInputStream();
+ String response = readIs(is);
+ Log.v(TAG, "Server response:" + response);
+ is.close();
+ }
+
+
conn.disconnect();
//Success