Class ResponseDecorated

java.lang.Object
io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
net.serenitybdd.rest.decorators.ResponseDecorated
All Implemented Interfaces:
io.restassured.response.ExtractableResponse<io.restassured.response.Response>, io.restassured.response.Response, io.restassured.response.ResponseBody<io.restassured.response.Response>, io.restassured.response.ResponseBodyData, io.restassured.response.ResponseBodyExtractionOptions, io.restassured.response.ResponseOptions<io.restassured.response.Response>, io.restassured.response.Validatable<io.restassured.response.ValidatableResponse,​io.restassured.response.Response>

public class ResponseDecorated
extends io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
implements io.restassured.response.Response
User: YamStranger Date: 3/22/16 Time: 10:30 PM
  • Field Summary

    Fields inherited from class io.restassured.internal.RestAssuredResponseOptionsImpl

    groovyResponse
  • Constructor Summary

    Constructors
    Constructor Description
    ResponseDecorated​(io.restassured.response.Response core)  
  • Method Summary

    Modifier and Type Method Description
    io.restassured.response.Response andReturn()  
    <T> T as​(io.restassured.common.mapper.TypeRef<T> typeRef)  
    <T> T as​(java.lang.Class<T> cls)  
    <T> T as​(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapper mapper)  
    <T> T as​(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)  
    <T> T as​(java.lang.reflect.Type cls)  
    <T> T as​(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapper mapper)  
    <T> T as​(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapperType mapperType)  
    byte[] asByteArray()  
    java.io.InputStream asInputStream()  
    java.lang.String asString()  
    io.restassured.response.ResponseBody body()  
    java.lang.String contentType()  
    java.lang.String cookie​(java.lang.String name)  
    java.util.Map<java.lang.String,​java.lang.String> cookies()  
    io.restassured.http.Cookie detailedCookie​(java.lang.String name)  
    io.restassured.http.Cookies detailedCookies()  
    io.restassured.response.ResponseBody getBody()  
    java.lang.String getContentType()  
    java.lang.String getCookie​(java.lang.String name)  
    java.util.Map<java.lang.String,​java.lang.String> getCookies()  
    io.restassured.http.Cookie getDetailedCookie​(java.lang.String name)  
    io.restassured.http.Cookies getDetailedCookies()  
    java.lang.String getHeader​(java.lang.String name)  
    io.restassured.http.Headers getHeaders()  
    java.lang.String getSessionId()  
    int getStatusCode()  
    java.lang.String getStatusLine()  
    long getTime()  
    long getTimeIn​(java.util.concurrent.TimeUnit timeUnit)  
    java.lang.String header​(java.lang.String name)  
    io.restassured.http.Headers headers()  
    io.restassured.path.xml.XmlPath htmlPath()  
    io.restassured.path.json.JsonPath jsonPath()  
    io.restassured.path.json.JsonPath jsonPath​(io.restassured.path.json.config.JsonPathConfig config)  
    <T> T path​(java.lang.String path, java.lang.String... arguments)  
    io.restassured.response.Response peek()  
    io.restassured.response.Response prettyPeek()  
    java.lang.String prettyPrint()  
    java.lang.String print()  
    java.lang.String sessionId()  
    int statusCode()  
    java.lang.String statusLine()  
    io.restassured.response.ValidatableResponse then()  
    io.restassured.response.Response thenReturn()  
    long time()  
    long timeIn​(java.util.concurrent.TimeUnit timeUnit)  
    io.restassured.path.xml.XmlPath xmlPath()  
    io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.config.XmlPathConfig config)  
    io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)  

    Methods inherited from class io.restassured.internal.RestAssuredResponseOptionsImpl

    asPrettyString, asString, getConfig, getConnectionManager, getContent, getDecoderConfig, getDefaultContentType, getFilterContextProperties, getGroovyResponse, getHasExpectations, getLogRepository, getResponseHeaders, getRpr, getSessionIdName, isInputStream, response, setConfig, setConnectionManager, setContent, setContentType, setCookies, setDecoderConfig, setDefaultContentType, setFilterContextProperties, setGroovyResponse, setHasExpectations, setLogRepository, setResponseHeaders, setRpr, setSessionIdName, setStatusCode, setStatusLine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.restassured.response.ResponseBodyData

    asPrettyString
  • Constructor Details

    • ResponseDecorated

      public ResponseDecorated​(io.restassured.response.Response core)
  • Method Details

    • then

      public io.restassured.response.ValidatableResponse then()
      Specified by:
      then in interface io.restassured.response.Validatable<io.restassured.response.ValidatableResponse,​io.restassured.response.Response>
    • print

      public java.lang.String print()
      Specified by:
      print in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      Overrides:
      print in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • prettyPrint

      public java.lang.String prettyPrint()
      Specified by:
      prettyPrint in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      Overrides:
      prettyPrint in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • peek

      public io.restassured.response.Response peek()
      Specified by:
      peek in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      Overrides:
      peek in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • prettyPeek

      public io.restassured.response.Response prettyPeek()
      Specified by:
      prettyPeek in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      Overrides:
      prettyPeek in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.Class<T> cls)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapper mapper)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(io.restassured.common.mapper.TypeRef<T> typeRef)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.reflect.Type cls)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapperType mapperType)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • as

      public <T> T as​(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapper mapper)
      Specified by:
      as in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      as in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • jsonPath

      public io.restassured.path.json.JsonPath jsonPath()
      Specified by:
      jsonPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      jsonPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • jsonPath

      public io.restassured.path.json.JsonPath jsonPath​(io.restassured.path.json.config.JsonPathConfig config)
      Specified by:
      jsonPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      jsonPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • xmlPath

      public io.restassured.path.xml.XmlPath xmlPath()
      Specified by:
      xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      xmlPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • xmlPath

      public io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.config.XmlPathConfig config)
      Specified by:
      xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      xmlPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • xmlPath

      public io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)
      Specified by:
      xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      xmlPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • htmlPath

      public io.restassured.path.xml.XmlPath htmlPath()
      Specified by:
      htmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      htmlPath in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • path

      public <T> T path​(java.lang.String path, java.lang.String... arguments)
      Specified by:
      path in interface io.restassured.response.ResponseBodyExtractionOptions
      Overrides:
      path in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • asString

      public java.lang.String asString()
      Specified by:
      asString in interface io.restassured.response.ResponseBodyData
      Overrides:
      asString in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • asByteArray

      public byte[] asByteArray()
      Specified by:
      asByteArray in interface io.restassured.response.ResponseBodyData
      Overrides:
      asByteArray in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • asInputStream

      public java.io.InputStream asInputStream()
      Specified by:
      asInputStream in interface io.restassured.response.ResponseBodyData
      Overrides:
      asInputStream in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • andReturn

      public io.restassured.response.Response andReturn()
      Specified by:
      andReturn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      andReturn in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • thenReturn

      public io.restassured.response.Response thenReturn()
      Specified by:
      thenReturn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      thenReturn in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • body

      public io.restassured.response.ResponseBody body()
      Specified by:
      body in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      body in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      body in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getBody

      public io.restassured.response.ResponseBody getBody()
      Specified by:
      getBody in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getBody in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • headers

      public io.restassured.http.Headers headers()
      Specified by:
      headers in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      headers in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      headers in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getHeaders

      public io.restassured.http.Headers getHeaders()
      Specified by:
      getHeaders in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getHeaders in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • header

      public java.lang.String header​(java.lang.String name)
      Specified by:
      header in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      header in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      header in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getHeader

      public java.lang.String getHeader​(java.lang.String name)
      Specified by:
      getHeader in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getHeader in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • cookies

      public java.util.Map<java.lang.String,​java.lang.String> cookies()
      Specified by:
      cookies in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      cookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      cookies in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • detailedCookies

      public io.restassured.http.Cookies detailedCookies()
      Specified by:
      detailedCookies in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      detailedCookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      detailedCookies in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getCookies

      public java.util.Map<java.lang.String,​java.lang.String> getCookies()
      Specified by:
      getCookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getCookies in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getDetailedCookies

      public io.restassured.http.Cookies getDetailedCookies()
      Specified by:
      getDetailedCookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getDetailedCookies in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • cookie

      public java.lang.String cookie​(java.lang.String name)
      Specified by:
      cookie in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      cookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      cookie in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getCookie

      public java.lang.String getCookie​(java.lang.String name)
      Specified by:
      getCookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getCookie in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • detailedCookie

      public io.restassured.http.Cookie detailedCookie​(java.lang.String name)
      Specified by:
      detailedCookie in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      detailedCookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      detailedCookie in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getDetailedCookie

      public io.restassured.http.Cookie getDetailedCookie​(java.lang.String name)
      Specified by:
      getDetailedCookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getDetailedCookie in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • contentType

      public java.lang.String contentType()
      Specified by:
      contentType in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      contentType in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      contentType in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getContentType

      public java.lang.String getContentType()
      Specified by:
      getContentType in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getContentType in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • statusLine

      public java.lang.String statusLine()
      Specified by:
      statusLine in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      statusLine in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      statusLine in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getStatusLine

      public java.lang.String getStatusLine()
      Specified by:
      getStatusLine in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getStatusLine in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • sessionId

      public java.lang.String sessionId()
      Specified by:
      sessionId in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      sessionId in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      sessionId in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getSessionId

      public java.lang.String getSessionId()
      Specified by:
      getSessionId in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getSessionId in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • statusCode

      public int statusCode()
      Specified by:
      statusCode in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      statusCode in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      statusCode in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getStatusCode

      public int getStatusCode()
      Specified by:
      getStatusCode in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getStatusCode in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • time

      public long time()
      Specified by:
      time in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      time in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      time in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • timeIn

      public long timeIn​(java.util.concurrent.TimeUnit timeUnit)
      Specified by:
      timeIn in interface io.restassured.response.ExtractableResponse<io.restassured.response.Response>
      Specified by:
      timeIn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      timeIn in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getTime

      public long getTime()
      Specified by:
      getTime in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getTime in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
    • getTimeIn

      public long getTimeIn​(java.util.concurrent.TimeUnit timeUnit)
      Specified by:
      getTimeIn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      Overrides:
      getTimeIn in class io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>