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() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
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) |
void |
setProperty(String property,
Object value) |
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, 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, xmlPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prettyPrint, print
as, as, as, as, as, as, as, htmlPath, jsonPath, jsonPath, path, xmlPath, xmlPath, xmlPath
asByteArray, asInputStream, asString
body, contentType, cookie, cookies, detailedCookie, detailedCookies, getBody, getContentType, getCookie, getCookies, getDetailedCookie, getDetailedCookies, getHeader, getHeaders, getSessionId, getStatusCode, getStatusLine, getTime, getTimeIn, header, headers, sessionId, statusCode, statusLine, time, timeIn
public void parseResponse(Object httpResponse, Object content, Object hasBodyAssertions, ResponseParserRegistrar responseParserRegistrar)
public Response prettyPeek()
ResponseBody
ResponseBody.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 RestAssuredResponseOptionsImpl
public Response peek()
ResponseBody
ResponseBody.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 RestAssuredResponseOptionsImpl
public Response thenReturn()
ResponseOptions
thenReturn
in interface ResponseOptions<Response>
thenReturn
in class RestAssuredResponseOptionsImpl
public Response andReturn()
ResponseOptions
andReturn
in interface ResponseOptions<Response>
andReturn
in class RestAssuredResponseOptionsImpl
public 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.GroovyObject
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
Copyright © 2010–2019. All rights reserved.