My response code is 200 and i get the data succeed , but i find that my json data is not complete .I really don't know why , is my code has something wrong ?
Here is my get data function:
private String getRouteJson(String url) throws IOException {
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
Log.d(TAG, "responseCode:"+responseCode );
StringBuilder jsonIn = new StringBuilder();
if (responseCode == 200) {
BufferedReader bf = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
while ((line = bf.readLine()) != null) {
jsonIn.append(line);
}
} else {
Log.d(TAG, "responseCode:"+responseCode );
}
connection.disconnect();
Log.d(TAG, "jsonIn:" + jsonIn.toString());
return jsonIn.toString();
}
I get the data that stuck when go to ,"EDUFDATE":"2017/09/07","SPONSER":"Asian EUS Group","EDUTYPE":"Dom
This is my get api: http://114.35.246.42:2212/MobileApp/DEST_WebService.asmx/GetEduData
I havn't meet the issue before , i really don't know hot to fix it.
Is any one can help me solve this problem ? That's would be appreciated !