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