Package org.springframework.http

# Interface StreamingHttpOutputMessage.Body

Enclosing interface:
  StreamingHttpOutputMessage

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface StreamingHttpOutputMessage.Body
Contract to stream request body content to an `OutputStream`. In some HTTP client libraries this is only possible indirectly through a callback mechanism.

## Method Summary

Modifier and Type
Method
Description
`default boolean`
`repeatable()`
Indicates whether this body is capable of writing its data more than once.
`void`
`writeTo(OutputStream outputStream)`
Write this body to the given `OutputStream`.

## Method Details

### writeTo

void writeTo(OutputStream outputStream) throws IOException
Write this body to the given `OutputStream`.

Parameters:
  `outputStream` - the output stream to write to
Throws:
  `IOException` - in case of I/O errors

### repeatable

default boolean repeatable()
Indicates whether this body is capable of writing its data more than once. The default implementation returns `false`.

Returns:
  `true` if this body can be written repeatedly, `false` otherwise
Since:
  6.1