31,7 → 31,7 |
if (response.getStatusCode() != 200) { |
onErrorHTTP(request, response); |
} else { |
if (response.getHeader("X-DebugJrest-Data").length() != 0) { |
if (avoirEnteteDebug(response)) { |
final JSONValue reponseEnteteDeboguage = JSONParser.parse(response.getHeader("X-DebugJrest-Data")); |
if (reponseEnteteDeboguage.isArray() != null) { |
GWT.log("DEBOGUAGE:\n"+formaterDeboguages(reponseEnteteDeboguage.isArray()), null); |
39,14 → 39,8 |
} |
|
JSONValue responseValue = null; |
if (response.getText() != null && response.getText().length() != 0) { |
JSONParser.parse(response.getText()); |
} else { |
if (response.getText() == null) { |
GWT.log("\tLa réponse vaul null", null); |
} else if (response.getText().length() == 0) { |
GWT.log("\tLa réponse a une taille de 0", null); |
} |
if (avoirContenu(response)) { |
responseValue = JSONParser.parse(response.getText()); |
} |
|
surReponse(responseValue); |
67,4 → 61,24 |
|
return deboguageFormate; |
} |
|
public Boolean avoirEnteteDebug(Response reponse) { |
Boolean retour = false; |
if (reponse.getHeader("X-DebugJrest-Data") != null && reponse.getHeader("X-DebugJrest-Data").length() != 0) { |
retour = true; |
} |
return retour; |
} |
|
public Boolean avoirContenu(Response reponse) { |
Boolean retour = false; |
if (reponse.getText() != null && reponse.getText().length() != 0) { |
retour = true; |
} else if (reponse.getText() == null) { |
GWT.log("La réponse vaul null", null); |
} else if (reponse.getText().length() == 0) { |
GWT.log("La réponse a une taille de 0", null); |
} |
return retour; |
} |
} |