Package io.airlift.http.client.testing
Class TestingResponse
java.lang.Object
io.airlift.http.client.testing.TestingResponse
- All Implemented Interfaces:
Response
-
Constructor Summary
ConstructorsConstructorDescriptionTestingResponse(HttpStatus status, com.google.common.collect.ListMultimap<String, String> headers, byte[] bytes) TestingResponse(HttpStatus status, com.google.common.collect.ListMultimap<String, String> headers, InputStream input) -
Method Summary
Modifier and TypeMethodDescriptioncontentType(com.google.common.net.MediaType type) longcom.google.common.collect.ListMultimap<HeaderName,String> intstatic ResponsemockResponse(HttpStatus status, com.google.common.net.MediaType type, String content) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.airlift.http.client.Response
getHeader, getHeaders
-
Constructor Details
-
TestingResponse
public TestingResponse(HttpStatus status, com.google.common.collect.ListMultimap<String, String> headers, byte[] bytes) -
TestingResponse
public TestingResponse(HttpStatus status, com.google.common.collect.ListMultimap<String, String> headers, InputStream input)
-
-
Method Details
-
getStatusCode
public int getStatusCode()- Specified by:
getStatusCodein interfaceResponse
-
getHeaders
- Specified by:
getHeadersin interfaceResponse
-
getBytesRead
public long getBytesRead()- Specified by:
getBytesReadin interfaceResponse
-
getInputStream
- Specified by:
getInputStreamin interfaceResponse- Throws:
IOException
-
toString
-
contentType
-
mockResponse
public static Response mockResponse(HttpStatus status, com.google.common.net.MediaType type, String content)
-