Interface SdkHttpResponse

All Superinterfaces:
SdkHttpHeaders, Serializable, ToCopyableBuilder<SdkHttpResponse.Builder,SdkHttpResponse>
All Known Subinterfaces:
SdkHttpFullResponse

An immutable HTTP response without access to the response body. SdkHttpFullResponse should be used when access to a response body stream is required.
  • Method Details

    • builder

      static SdkHttpFullResponse.Builder builder()
      Returns:
      Builder instance to construct a DefaultSdkHttpFullResponse.
    • statusText

      Optional<String> statusText()
      Returns the HTTP status text returned by the service.

      If this was not provided by the service, empty will be returned.

    • statusCode

      int statusCode()
      Returns the HTTP status code (eg. 200, 404, etc.) returned by the service.

      This will always be positive.

    • isSuccessful

      default boolean isSuccessful()
      If we get back any 2xx status code, then we know we should treat the service call as successful.