From 8f906ddff92f99e6708f108655148d2053660546 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 31 Oct 2019 14:36:45 +0400 Subject: [PATCH] Added full url in the function handleStatuses --- .../md/com/networkexample/networking/ExampleNetworking.java | 2 +- .../src/main/java/com/dm/dmnetworking/DMNetworkBase.java | 2 +- .../main/java/com/dm/dmnetworking/DMNetworkBaseNetworking.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/networkexample/md/com/networkexample/networking/ExampleNetworking.java b/app/src/main/java/networkexample/md/com/networkexample/networking/ExampleNetworking.java index 4849143..7899080 100644 --- a/app/src/main/java/networkexample/md/com/networkexample/networking/ExampleNetworking.java +++ b/app/src/main/java/networkexample/md/com/networkexample/networking/ExampleNetworking.java @@ -28,7 +28,7 @@ public static ExampleNetworking getInstance() { } @Override - protected void handleStatuses(final Context context, final int statusCode, final JSONObject jsonObject, final DMNetworkIStatusHandleListener listener) { + protected void handleStatuses(final Context context, final int statusCode, final String fullUrl, final JSONObject jsonObject, final DMNetworkIStatusHandleListener listener) { try { String status = ""; if (jsonObject != null) { diff --git a/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBase.java b/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBase.java index 72fe013..45389f0 100644 --- a/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBase.java +++ b/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBase.java @@ -7,7 +7,7 @@ abstract class DMNetworkBase implements DMNetworkIBaseMethod { - protected abstract void handleStatuses(final Context context, final int statusCode, final JSONObject jsonObject, final DMNetworkIStatusHandleListener listener); + protected abstract void handleStatuses(final Context context, final int statusCode, final String fullUrl, final JSONObject jsonObject, final DMNetworkIStatusHandleListener listener); protected abstract int getRequestTimeOut(); diff --git a/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBaseNetworking.java b/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBaseNetworking.java index 8b19a2c..6d7f6f4 100644 --- a/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBaseNetworking.java +++ b/dmnetworking/src/main/java/com/dm/dmnetworking/DMNetworkBaseNetworking.java @@ -55,7 +55,7 @@ private void handleResponse(final DMNetworkBaseRequestConfig config showLogs(config.getUrl(), jsonObject, file, jsonType); - handleStatuses(config.getContext(), statusCode, jsonObject, new DMNetworkIStatusHandleListener() { + handleStatuses(config.getContext(), statusCode, config.getUrl(), jsonObject, new DMNetworkIStatusHandleListener() { @Override public void onComplete(final String status, final JSONObject jsonObject) { if (file == null && jsonObject != null) {