Class AbstractStreamingClientHttpRequest

java.lang.Object
org.springframework.http.client.AbstractClientHttpRequest
org.springframework.http.client.AbstractStreamingClientHttpRequest
All Implemented Interfaces:
ClientHttpRequest, HttpMessage, HttpOutputMessage, HttpRequest, StreamingHttpOutputMessage

public abstract class AbstractStreamingClientHttpRequest extends AbstractClientHttpRequest implements StreamingHttpOutputMessage
Extension of AbstractClientHttpRequest that adds the ability to stream request body content directly to the underlying HTTP client library through the StreamingHttpOutputMessage contract.

It is necessary to call setBody(StreamingHttpOutputMessage.Body) and stream the request body through a callback for access to the OutputStream. The alternative to call AbstractClientHttpRequest.getBody() is also supported as a fallback, but that does not stream, and returns an aggregating OutputStream instead.

Since:
6.1
Author:
Arjen Poutsma, Rossen Stoyanchev