Package dev.gmitch215.bytebox.net.http
Class HttpRequest.BodyPublisher
java.lang.Object
dev.gmitch215.bytebox.net.http.HttpRequest.BodyPublisher
- Enclosing class:
HttpRequest
A request body.
Only the ones HttpRequest.BodyPublishers makes: the platform sends a request in one call rather
than as a stream of items, so there is nothing here for a publisher of your own to be driven by.
Writing one fails to compile, which is where it should fail.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the length, which is always known because the body is always in hand.
-
Method Details
-
contentLength
public long contentLength()Returns the length, which is always known because the body is always in hand.- Returns:
- the length, which is always known because the body is always in hand
-