Package com.intellectualsites.http
Class HttpResponse
java.lang.Object
com.intellectualsites.http.HttpResponse
A HTTP response
-
Method Summary
Modifier and TypeMethodDescription@NotNull com.intellectualsites.http.HeadersGet the response headers@org.jetbrains.annotations.NotNull byte[]Get the raw response body<T> TgetResponseEntity(@NotNull Class<T> returnType)Get the response entity and map it to a specific typeGet the HTTP status messageintGet the HTTP status code
-
Method Details
-
getStatus
Get the HTTP status message- Returns:
- Status message
-
getStatusCode
public int getStatusCode()Get the HTTP status code- Returns:
- Status code
-
getRawResponse
Get the raw response body- Returns:
- Response body
-
getHeaders
Get the response headers- Returns:
- Response headers
-
getResponseEntity
Get the response entity and map it to a specific type- Type Parameters:
T- Return type- Parameters:
returnType- Return type class- Returns:
- Response
- Throws:
IllegalArgumentException- If no mapper exists for the type
-