@Override
public <T> T mapToObject(Response resp, Class<T> clazz) throws ResponseException {
String msg = "";
if (resp.getCode() != 200) {
throw new ResponseException(resp);
}
try {
msg = resp.getBody();
if (clazz.equals(String.class))
return (T) msg;