@NotThreadSafe public class CombinedClientHttpResponse extends Object implements org.springframework.http.client.ClientHttpResponse
ClientHttpResponse implementation that combines an existing response
with a different body. It delegates all methods to the underlying
ClientHttpResponse expect getBody(), that returns the
specified body instead of the one inside the underlying response.| Constructor and Description |
|---|
CombinedClientHttpResponse(org.springframework.http.client.ClientHttpResponse response,
InputStream body) |
public CombinedClientHttpResponse(org.springframework.http.client.ClientHttpResponse response,
InputStream body)
response - The original response to decorate.body - The body of the message as an input stream.public InputStream getBody() throws IOException
getBody in interface org.springframework.http.HttpInputMessageIOExceptionpublic org.springframework.http.HttpHeaders getHeaders()
getHeaders in interface org.springframework.http.HttpMessageCopyright © 2014. All rights reserved.