Package com.oracle.bmc.http.client
Interface HttpResponse
-
- All Superinterfaces:
AutoCloseable,Closeable
public interface HttpResponse extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> CompletionStage<T>body(Class<T> type)voidclose()Close this response.default Stringheader(String name)Map<String,List<String>>headers()<T> CompletionStage<List<T>>listBody(Class<T> type)intstatus()CompletionStage<InputStream>streamBody()CompletionStage<String>textBody()
-
-
-
Method Detail
-
status
int status()
-
streamBody
CompletionStage<InputStream> streamBody()
-
body
<T> CompletionStage<T> body(Class<T> type)
-
listBody
<T> CompletionStage<List<T>> listBody(Class<T> type)
-
textBody
CompletionStage<String> textBody()
-
close
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.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-