Interface RequestBody
- All Superinterfaces:
AutoCloseable, Closeable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes thisRequestBodyand releases all resources.default OptionalLongReturns the content length, if known.A HTTP/Conjure content type (e.g., "application/json") indicating the type of content.booleanReturnsvoidwriteTo(OutputStream output) The content of this request body, possibly empty.
-
Method Details
-
writeTo
The content of this request body, possibly empty.- Throws:
IOException
-
contentType
String contentType()A HTTP/Conjure content type (e.g., "application/json") indicating the type of content. -
repeatable
boolean repeatable()Returnstrue
ifwriteTo(OutputStream)may be invoked multiple times. -
contentLength
Returns the content length, if known. -
close
void close()Closes thisRequestBodyand releases all resources. Callingclose()should never throw, preferring to catch and log.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-