public RepresentationWalker(final RestfulClient restfulClient, final Response response) { this.restfulClient = restfulClient; final RestfulResponse<JsonRepresentation> jsonResp = RestfulResponse.of(response); addStep(null, null, null, jsonResp, null, null); }
entity = jsonResponse.getEntity(); } catch (final Exception e) { addStep(path, null, null, null, "exception: " + e.getMessage(), e); return; link = entity.getLink(path); } catch (final Exception e) { addStep(path, null, null, null, "exception: " + e.getMessage(), e); return; addStep(path, null, null, null, "no such link '" + path + "'", null); return; addStep(path, link, null, null, "failed to follow link: " + e.getMessage(), e); return; addStep(path, link, null, response, null, null);