} else if (e.getMessage().indexOf("405") > -1) {
// requested url is not allowed by the server
throw new NotAllowedException(url);
} else if (e.getMessage().indexOf("501") > -1) {
// requested url is not recognized by the server
throw new UnknownRequestException(url);
}
throw e;
}
}