Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.http.client
Interface ClientHttpResponse

All Superinterfaces:
  HttpInputMessage, HttpMessage

    public interface ClientHttpResponse

extends HttpInputMessage

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

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

Since:
  3.0
Author:
  Arjen Poutsma

Method Summary
`void` | `close()` Closes this response, freeing any resources created.
`HttpStatus` | `getStatusCode()` Return the HTTP status code of the response.
`String` | `getStatusText()` Return the HTTP status text of the response.

Methods inherited from interface org.springframework.http.HttpInputMessage
`getBody`

Methods inherited from interface org.springframework.http.HttpMessage
`getHeaders`

Method Detail

### getStatusCode

    HttpStatus getStatusCode()
                             throws IOException

  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

### getStatusText

    String getStatusText()
                         throws IOException

  Return the HTTP status text of the response.

  Returns:
    the HTTP status text
  Throws:
    `IOException` - in case of I/O errors

### close

    void close()

  Closes this response, freeing any resources created.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD