Interface PortableHttpResponse
-
public interface PortableHttpResponse
This interface exposes the commonalities between the Apache httpasyncclient and Netty and R2 client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsHeader(java.lang.String headerName)
io.netty.buffer.ByteBuf
getContentInByteBuf()
Returns the response as ByteBuf.java.lang.String
getFirstHeader(java.lang.String headerName)
int
getStatusCode()
-
-
-
Method Detail
-
getStatusCode
int getStatusCode()
- Returns:
- Status code of the response, like 200, 400, 500 etc.
-
getContentInByteBuf
io.netty.buffer.ByteBuf getContentInByteBuf() throws java.io.IOException
Returns the response as ByteBuf.- Returns:
- Throws:
java.io.IOException
-
containsHeader
boolean containsHeader(java.lang.String headerName)
- Parameters:
headerName
-- Returns:
- whether response contains header name specified in the parameters
-
getFirstHeader
java.lang.String getFirstHeader(java.lang.String headerName)
- Parameters:
headerName
-- Returns:
- the value of the first header for header name specified in the parameters
-
-