Class ResponseStub

  • All Implemented Interfaces:
    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 ResponseStub
    extends Object
    implements io.restassured.response.Response
    Created by john on 23/07/2015.
    • Constructor Detail

      • ResponseStub

        public ResponseStub()
    • Method Detail

      • 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 String print()
        Specified by:
        print in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      • prettyPrint

        public String prettyPrint()
        Specified by:
        prettyPrint in interface io.restassured.response.ResponseBody<io.restassured.response.Response>
      • peek

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

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

        public <T> T as​(Class<T> cls)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • as

        public <T> T as​(Class<T> cls,
                        io.restassured.mapper.ObjectMapperType mapperType)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • as

        public <T> T as​(Class<T> cls,
                        io.restassured.mapper.ObjectMapper mapper)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • as

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

        public <T> T as​(Type cls)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • as

        public <T> T as​(Type cls,
                        io.restassured.mapper.ObjectMapperType mapperType)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • as

        public <T> T as​(Type cls,
                        io.restassured.mapper.ObjectMapper mapper)
        Specified by:
        as in interface io.restassured.response.ResponseBodyExtractionOptions
      • jsonPath

        public io.restassured.path.json.JsonPath jsonPath()
        Specified by:
        jsonPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • jsonPath

        public io.restassured.path.json.JsonPath jsonPath​(io.restassured.path.json.config.JsonPathConfig config)
        Specified by:
        jsonPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • xmlPath

        public io.restassured.path.xml.XmlPath xmlPath()
        Specified by:
        xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • xmlPath

        public io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.config.XmlPathConfig config)
        Specified by:
        xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • xmlPath

        public io.restassured.path.xml.XmlPath xmlPath​(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)
        Specified by:
        xmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • htmlPath

        public io.restassured.path.xml.XmlPath htmlPath()
        Specified by:
        htmlPath in interface io.restassured.response.ResponseBodyExtractionOptions
      • path

        public <T> T path​(String path,
                          String... arguments)
        Specified by:
        path in interface io.restassured.response.ResponseBodyExtractionOptions
      • asString

        public String asString()
        Specified by:
        asString in interface io.restassured.response.ResponseBodyData
      • asPrettyString

        public String asPrettyString()
        Specified by:
        asPrettyString in interface io.restassured.response.ResponseBodyData
      • asByteArray

        public byte[] asByteArray()
        Specified by:
        asByteArray in interface io.restassured.response.ResponseBodyData
      • asInputStream

        public InputStream asInputStream()
        Specified by:
        asInputStream in interface io.restassured.response.ResponseBodyData
      • andReturn

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

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

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

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

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

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

        public String header​(String name)
        Specified by:
        header in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getHeader

        public String getHeader​(String name)
        Specified by:
        getHeader in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • cookies

        public Map<String,​String> cookies()
        Specified by:
        cookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • detailedCookies

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

        public Map<String,​String> getCookies()
        Specified by:
        getCookies in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getDetailedCookies

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

        public String cookie​(String name)
        Specified by:
        cookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getCookie

        public String getCookie​(String name)
        Specified by:
        getCookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • detailedCookie

        public io.restassured.http.Cookie detailedCookie​(String name)
        Specified by:
        detailedCookie in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getDetailedCookie

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

        public String contentType()
        Specified by:
        contentType in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • statusLine

        public String statusLine()
        Specified by:
        statusLine in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getStatusLine

        public String getStatusLine()
        Specified by:
        getStatusLine in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • sessionId

        public String sessionId()
        Specified by:
        sessionId in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getSessionId

        public String getSessionId()
        Specified by:
        getSessionId in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • statusCode

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

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

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

        public long timeIn​(TimeUnit timeUnit)
        Specified by:
        timeIn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>
      • getTime

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

        public long getTimeIn​(TimeUnit timeUnit)
        Specified by:
        getTimeIn in interface io.restassured.response.ResponseOptions<io.restassured.response.Response>