I'm using retrofit to consume web services and everything is OK but I'd like to handle html response when web service response 503 code.
This is the html response and I would like to know how to get title or iframe src value
Code to call web service:
ParameterCall parameterCall = new ParameterCall();
parameterCall.setDeviceType(Constants.DEVICE_TYPE);
Util.getRetrofit(this).parameter(parameterCall).enqueue(new Callback<ParameterResponse>() {
@Override
public void onResponse(Call<ParameterResponse> call, Response<ParameterResponse> response) {
if (response.isSuccessful() && response.body().getStatus() == 1) {
//do smt
}else if(response.code() == 503){
//Here I want to show a dialog if html structure shows me the word "MANTENIMIENTO" in "body iframe"
}