yes, something like this
if (!response.isSuccessful()) {
result = "fail"
} else {
result = response.body().string()
}
return result
and i think it would be better like this
return (!response.isSuccessful()) ? "fail" : response.body().string()