public interface

ClientHttpResponse

implements HttpInputMessage
org.springframework.http.client.ClientHttpResponse

Class Overview

Represents a client-side HTTP response. Obtained via an calling of the execute().

A ClientHttpResponse must be closed, typically in a finally block.

Summary

Public Methods
abstract void close()
Closes this response, freeing any resources created.
abstract HttpStatus getStatusCode()
Return the HTTP status code of the response.
abstract String getStatusText()
Return the HTTP status text of the response.
[Expand]
Inherited Methods
From interface org.springframework.http.HttpInputMessage
From interface org.springframework.http.HttpMessage

Public Methods

public abstract void close ()

Closes this response, freeing any resources created.

public abstract HttpStatus getStatusCode ()

Return the HTTP status code of the response.

Returns
  • the HTTP status as an HttpStatus enum value
Throws
IOException in case of I/O errors

public abstract String getStatusText ()

Return the HTTP status text of the response.

Returns
  • the HTTP status text
Throws
IOException in case of I/O errors