Interface Response
- All Known Implementing Classes:
SimpleResponse
public interface Response
Implementation-agnostic representation of a HTTP response
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()Deprecated.Get the content-type header of this response, if it has been set.getHeaderValue(String name) Get the first of header value for the header param with the given name (if any exist).getHeaderValues(String name) Get the collection of header values for the header param with the given name.int
-
Method Details
-
getStatus
int getStatus()- Returns:
- The response status code
-
getBody
Deprecated.usegetResponseBody(). This method will be removed in a future release.- Returns:
- The response body, if there is one.
-
getResponseBody
- Returns:
- the response body
-
getHeaderValues
Get the collection of header values for the header param with the given name.- Parameters:
name- The (case insensitive) name of the parameter to retrieve- Returns:
- The header values for that param; or empty list
-
getHeaderValue
Get the first of header value for the header param with the given name (if any exist).- Parameters:
name- The (case insensitive) name of the parameter to retrieve- Returns:
- The first header value for that param (if it exists)
-
getContentType
Get the content-type header of this response, if it has been set.- Returns:
- The content-type header, or empty if it has not been set.
-
getResponseBody().