Package io.airlift.http.client.testing
Class TestingResponse
- java.lang.Object
-
- io.airlift.http.client.testing.TestingResponse
-
-
Constructor Summary
Constructors Constructor Description TestingResponse(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.google.common.collect.ListMultimap<String,String>contentType(com.google.common.net.MediaType type)longgetBytesRead()com.google.common.collect.ListMultimap<HeaderName,String>getHeaders()InputStreamgetInputStream()intgetStatusCode()static ResponsemockResponse(HttpStatus status, com.google.common.net.MediaType type, String content)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.airlift.http.client.Response
getHeader, getHeaders
-
-
-
-
Constructor Detail
-
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 Detail
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceResponse
-
getHeaders
public com.google.common.collect.ListMultimap<HeaderName,String> getHeaders()
- Specified by:
getHeadersin interfaceResponse
-
getBytesRead
public long getBytesRead()
- Specified by:
getBytesReadin interfaceResponse
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceResponse- Throws:
IOException
-
contentType
public static com.google.common.collect.ListMultimap<String,String> contentType(com.google.common.net.MediaType type)
-
mockResponse
public static Response mockResponse(HttpStatus status, com.google.common.net.MediaType type, String content)
-
-