I am trying to read Json response on specific HTTP status code using volley error method. Yet I am unable to read JSON response following this way it gives me HTML code while returning the response.
//Doing this by Using VolleyError class.
String responseBody = new String(error.networkResponse.data, “utf-8”);
// Log.i(“DataX:”, responseBody);
// JSONObject data = new JSONObject(responseBody);
// Log.i(“Data:”, error.networkResponse.data.toString());
If anyone can provide any help with this.