public class RestAssuredResponseImpl extends RestAssuredResponseOptionsImpl implements Response, groovy.lang.GroovyObject
groovyResponse| Constructor and Description |
|---|
RestAssuredResponseImpl() |
| Modifier and Type | Method and Description |
|---|---|
Response |
andReturn()
Syntactic sugar, simply returns the same response instance.
|
groovy.lang.MetaClass |
getMetaClass() |
void |
parseResponse(Object httpResponse,
Object content,
Object hasBodyAssertions,
ResponseParserRegistrar responseParserRegistrar) |
Response |
peek()
Peeks into the JSON that JsonPath will parse by printing it to the console.
|
Response |
prettyPeek()
Peeks into the response body by printing it to the console in a prettified manner.
|
void |
setMetaClass(groovy.lang.MetaClass mc) |
ValidatableResponse |
then()
Returns a validatable response that's lets you validate the response.
|
Response |
thenReturn()
Syntactic sugar, simply returns the same response instance.
|
as, as, as, as, as, as, as, asByteArray, asInputStream, asPrettyString, asString, asString, body, contentType, cookie, cookies, detailedCookie, detailedCookies, getBody, getConfig, getConnectionManager, getContent, getContentType, getCookie, getCookies, getDecoderConfig, getDefaultContentType, getDetailedCookie, getDetailedCookies, getFilterContextProperties, getGroovyResponse, getHasExpectations, getHeader, getHeaders, getLogRepository, getResponseHeaders, getRpr, getSessionId, getSessionIdName, getStatusCode, getStatusLine, getTime, getTimeIn, header, headers, htmlPath, isInputStream, jsonPath, jsonPath, path, prettyPrint, print, response, sessionId, setConfig, setConnectionManager, setContent, setContentType, setCookies, setDecoderConfig, setDefaultContentType, setFilterContextProperties, setGroovyResponse, setHasExpectations, setLogRepository, setResponseHeaders, setRpr, setSessionIdName, setStatusCode, setStatusLine, statusCode, statusLine, time, timeIn, xmlPath, xmlPath, xmlPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprettyPrint, printas, as, as, as, as, as, as, htmlPath, jsonPath, jsonPath, path, xmlPath, xmlPath, xmlPathasByteArray, asInputStream, asPrettyString, asStringbody, contentType, cookie, cookies, detailedCookie, detailedCookies, getBody, getContentType, getCookie, getCookies, getDetailedCookie, getDetailedCookies, getHeader, getHeaders, getSessionId, getStatusCode, getStatusLine, getTime, getTimeIn, header, headers, sessionId, statusCode, statusLine, time, timeInpublic void parseResponse(Object httpResponse, Object content, Object hasBodyAssertions, ResponseParserRegistrar responseParserRegistrar)
public Response prettyPeek()
ResponseBodyResponseBody.prettyPrint(). If you want to return a prettified version of the content and also print it to the console use ResponseBody.prettyPrint().
Note that the content is not guaranteed to be looking exactly like the it does at the source. This is because once you peek the content has is downloaded and transformed into another data structure and is rendered from this data structure.
prettyPeek in interface ResponseBody<Response>prettyPeek in class RestAssuredResponseOptionsImplpublic Response peek()
ResponseBodyResponseBody.prettyPrint(). If you want to return a prettified version of the content and also print it to the console use ResponseBody.prettyPrint().
Note that the content is not guaranteed to be looking exactly like the it does at the source. This is because once you peek the content has is downloaded and transformed into another data structure and is rendered from this data structure.
peek in interface ResponseBody<Response>peek in class RestAssuredResponseOptionsImplpublic Response thenReturn()
ResponseOptionsthenReturn in interface ResponseOptions<Response>thenReturn in class RestAssuredResponseOptionsImplpublic Response andReturn()
ResponseOptionsandReturn in interface ResponseOptions<Response>andReturn in class RestAssuredResponseOptionsImplpublic ValidatableResponse then()
Validatable
given().
param("firstName", "John").
param("lastName", "Doe").
when().
get("/greet").
then().
body("greeting", equalTo("John Doe"));
then in interface Validatable<ValidatableResponse,Response>public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectCopyright © 2010–2020. All rights reserved.