/** @return true if response does not indicate an error. */ public boolean responseIsValid() { boolean result; try { response.validResponse(); result = true; } catch (RuntimeException e) { result = false; } return result; }
protected boolean postToImpl(String body, String serviceUrl) { boolean result; resetResponse(); response.setRequest(body); String url = getUrl(serviceUrl); try { getEnvironment().doHttpPost(url, response, headerValues, getContentType()); } catch (Throwable t) { throw new StopTestException("Unable to get response from POST to: " + url, t); } result = postProcessResponse(); return result; }
/** @return http status received in response to last request. */ public int responseStatus() { return response.getStatusCode(); }
/** @return HTML response received last time postTo() or get() was called. */ public String htmlResponse() { String content = response.getResponse(); content = "<div>" + content + "</div>"; return content; }
/** @return response received last time postTo(), delete() or getFrom() was called. */ public String response() { return safeFormatValue(response.getResponse()); }