api – Volley Android JSON GET Return Code is 200 but response is empty-ThrowExceptions

Exception or error:

Here is my code:

final JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET,
                        URLHelper.REQUEST_STATUS_CHECK_API, null, new Response.Listener<JSONObject>() {

public void onResponse(JSONObject response) {


utils.print("Response", "" + response.toString());

if (response.optJSONArray("data") != null && response.optJSONArray("data").length() > 0) {

a) Able to contact the server and return code is 200
b) But the “response” string and the “data” array is empty.

Any help will be highly appreciated.

Here is the Postman result:

PostMan Result

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *