Interface Response<T>

Type Parameters:
T - the type of the response body

public interface Response<T>
An HTTP Response.

This interface provides a generic API for interacting with HTTP responses.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An interface for mapping an HTTP response into a specific Java type.
    static final class 
    Convenience methods for creating common Response.BodyHandler objects.
    static interface 
    Initial response info supplied to a Response.BodyHandler before the body is processed.
  • Method Summary

    Modifier and Type
    Method
    Description
    The body of the HTTP response.
    The headers from this HTTP response.
    int
    The status code of an HTTP response.
    uri()
    The URI from which the response was received.
  • Method Details

    • body

      T body()
      The body of the HTTP response.
      Returns:
      the response body
    • headers

      Headers headers()
      The headers from this HTTP response.
      Returns:
      the response headers
    • uri

      URI uri()
      The URI from which the response was received.
      Returns:
      the response URI
    • statusCode

      int statusCode()
      The status code of an HTTP response.
      Returns:
      the response code