class HttpStreamBody
source · line 21public
public class HttpStreamBody public constructor(
/** The producer, invoked only when the request and status permit content. */
public val produce: suspend (HttpBodyWriter) -> Unit,
/** The exact original-content length, if known without executing the producer. */
public val length: Long? = None,
/** Trailers collected after successful production; never called for HEAD. */
public val trailers: (() -> List<HttpField>)? = None
)
A suspending producer and its optional original-content length and final trailers.
property length
source · line 25public
public val length: Long? = None
get: public read-only
The exact original-content length, if known without executing the producer.
constructor constructor
source · line 21public
constructor(public val produce: suspend (HttpBodyWriter) -> Unit, public val length: Long? = None, public val trailers: (() -> List<HttpField>)? = None)
parameter trailers
source · line 27public
public val trailers: (() -> List<HttpField>)? = None
parameter produce
source · line 23public
public val produce: suspend (HttpBodyWriter) -> Unit
parameter length
source · line 25public
public val length: Long? = None
property produce
source · line 23public
public val produce: suspend (HttpBodyWriter) -> Unit
get: public read-only
The producer, invoked only when the request and status permit content.
property trailers
source · line 27public
public val trailers: (() -> List<HttpField>)? = None
get: public read-only
Trailers collected after successful production; never called for HEAD.