public interface HttpResponse extends Closeable
| Modifier and Type | Method and Description |
|---|---|
<T> CompletionStage<T> |
body(Class<T> type) |
void |
close()
Close this response.
|
default String |
header(String name) |
Map<String,List<String>> |
headers() |
<T> CompletionStage<List<T>> |
listBody(Class<T> type) |
int |
status() |
CompletionStage<InputStream> |
streamBody() |
CompletionStage<String> |
textBody() |
int status()
CompletionStage<InputStream> streamBody()
<T> CompletionStage<T> body(Class<T> type)
<T> CompletionStage<List<T>> listBody(Class<T> type)
CompletionStage<String> textBody()
void close()
Close this response. Some operations on the request will not work after this call (notably
body(Class)). However if the body has already been requested, that body will remain
valid even if the stage has not yet completed, or if it is a streaming response (InputStream). Such a response needs to be closed separately.
close in interface AutoCloseableclose in interface CloseableCopyright © 2016–2024. All rights reserved.