public interface HttpResponse<T> extends HttpHeaders
| Modifier and Type | Method and Description |
|---|---|
T |
body()
Get the body.
|
default String |
bodyString()
Return the body as a String.
|
int |
code() |
default boolean |
isSuccessful() |
static boolean |
isSuccessful(int code) |
default String |
message() |
Optional<HttpResponse<T>> |
previousResponse() |
HttpRequest |
request() |
headersdefault boolean isSuccessful()
static boolean isSuccessful(int code)
int code()
default String message()
T body()
Closeable, it should be closed by the caller.default String bodyString() throws IOException
InputStream, it will be read as UTF-8.IOExceptionHttpRequest request()
Optional<HttpResponse<T>> previousResponse()
Copyright © 2015–2022 Red Hat. All rights reserved.