Interface Response
- All Superinterfaces:
AutoCloseable, Closeable
-
Method Summary
Modifier and TypeMethodDescriptionThe mutable response attachments.body()The HTTP body for this response.voidclose()Releases all resources associated with this response.intcode()The HTTP response code for this response.getFirstHeader(String header) Retrieves the first value from the header map for the given key.headers()The HTTP headers for this response.
-
Method Details
-
body
InputStream body()The HTTP body for this response. -
code
int code()The HTTP response code for this response. -
headers
-
getFirstHeader
-
attachments
ResponseAttachments attachments()The mutable response attachments. -
close
void close()Releases all resources associated with this response. If thebody()is still open,close()shouldclose the stream. Implementations must not throw, preferring to catch and log internally. Note that in the case of binary and optional binary endpoints, this method may not be called as the user is expected to close thebody()themselves.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-