Uses of Class
kong.unirest.core.MockResponse
Packages that use MockResponse
-
Uses of MockResponse in kong.unirest.core
Methods in kong.unirest.core that return MockResponseModifier and TypeMethodDescriptionstatic <T> MockResponse
<T> MockResponse.bad
(T body) Construct a simple failed (400 bad request) response with a bodyMockResponse.failedToParse()
Flag that there was a post-processing parsing error with the object Mapper this jams the body as a string into the parsing exception and sets a generic oops exceptionMockResponse.failedToParse
(Exception e, String originalBody) Flag that there was a post-processing parsing error with the object Mapperstatic <T> MockResponse
<T> Construct a response with a status and body.static <T> MockResponse
<T> MockResponse.of
(int status, T body) Construct a response with a status and body.static <T> MockResponse
<T> MockResponse.ok
(T body) Construct a simple successful (200 ok) response with a bodyMockResponse.withConfigOptions
(Consumer<MockConfig> c) Set some options on the current MockConfig.MockResponse.withHeader
(String key, String value) add a header value to the responseMethods in kong.unirest.core with parameters of type MockResponseModifier and TypeMethodDescriptionprivate ExpectedResponse
ExpectedResponseRecord.thenReturn
(MockResponse res)