Package io.varhttp.test
Class VarClientResponse
java.lang.Object
io.varhttp.test.VarClientResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertContent
(String expected) assertContentType
(String contentType) assertHeader
(String name, String expectedValue) assertHeaderSize
(String name, int expectedSize) assertOnResponse
(Consumer<HttpResponse> assertion) assertStatusCode
(int code) <T> T
getContent
(Class<T> clazz) <T> T
getContent
(Type type) Deprecated.Get the list of cookies that the server has set in the responseisOk()
-
Constructor Details
-
VarClientResponse
-
-
Method Details
-
assertStatusCode
-
isOk
-
isInternalError
-
isBadRequest
-
isUnsupportedMediaType
-
isCreated
-
isNotFound
-
isNotAuthorized
-
isForbidden
-
assertContentType
-
assertContent
-
assertHeader
-
assertHeaderSize
-
assertOnResponse
-
getHeader
-
getLocation
-
getCookies
Deprecated.usegetSetCookies()
insteadGet the list of cookies that the server has set in the responseIf a cookie is present on the client already and not set by the server in this response, it will not be included in this list
- Returns:
- list of cookies set by the server, or an empty list if no cookies were set
-
getSetCookies
Get the list of cookies that the server has set in the responseIf a cookie is present on the client already and not set by the server in this response, it will not be included in this list
- Returns:
- list of cookies set by the server, or an empty list if no cookies were set
-
getContent
-
getContent
-
getContent
-
downloadContent
-
getSetCookies()
instead