HttpResponse.ResponseInfo (Java SE 26 & JDK 26)
Description: declaration: module: java.net.http, package: java.net.http, interface: HttpResponse, interface: ResponseInfo
Keywords: java.net.http.HttpResponse.ResponseInfo interface

# Interface HttpResponse.ResponseInfo

Enclosing interface:
  `HttpResponse<T>`

public static interface HttpResponse.ResponseInfo
Initial response information supplied to a `BodyHandler` when a response is initially received and before the body is processed.

Since:
  11

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HttpHeaders`
  `headers()`
  Provides the response headers.
  `int`
  `statusCode()`
  Provides the response status code.
  `HttpClient.Version`
  `version()`
  Provides the response protocol version.

- ## Method Details

  - ### statusCode

    int statusCode()
    Provides the response status code.
    Returns:
      the response status code

  - ### headers

    HttpHeaders headers()
    Provides the response headers.
    Returns:
      the response headers

  - ### version

    HttpClient.Version version()
    Provides the response protocol version.
    Returns:
      the response protocol version