public interface Response extends ResponseBody<Response>, ResponseOptions<Response>, Validatable<ValidatableResponse,Response>
Usage example:
Response response = get("/lotto");
String body = response.getBody().asString();
String headerValue = response.getHeader("headerName");
String cookieValue = response.getCookie("cookieName");
You can also map the response body to a Java object automatically. REST Assured will use Jackson, Gson and JAXB to accommodate this:
Message message = get("/message").as(Message.class);
peek, prettyPeek, prettyPrint, printas, as, as, htmlPath, jsonPath, jsonPath, path, xmlPath, xmlPath, xmlPathasByteArray, asInputStream, asStringandReturn, body, contentType, cookie, cookies, detailedCookie, detailedCookies, getBody, getContentType, getCookie, getCookies, getDetailedCookie, getDetailedCookies, getHeader, getHeaders, getSessionId, getStatusCode, getStatusLine, getTime, getTimeIn, header, headers, sessionId, statusCode, statusLine, thenReturn, time, timeInthenCopyright © 2010–2015. All rights reserved.