/** * @return string representation of this response */ public String toString() { StringBuilder builder = new StringBuilder(); if (getStatusCode() != null) builder.append(String.format("[%s] %s", this.getStatusCode(), this.getStatusText())); builder.append(LINE_SEPARATOR); builder.append(super.toString()); return builder.toString(); }
/** * String representation of this request. * * @return the string representation */ public String toString() { StringBuilder builder = new StringBuilder(); if (getMethod() != null) builder.append(getMethod().toString()).append(" "); if (getResource() != null) builder.append(this.getResource()); if (getQuery() != null) builder.append("?").append(this.getQuery()); builder.append(LINE_SEPARATOR); builder.append(super.toString()); return builder.toString(); } }