org.springframework.web.client

Class HttpStatusCodeException

    • Constructor Detail

      • HttpStatusCodeException

        protected HttpStatusCodeException(HttpStatus statusCode)
        Construct a new instance with an HttpStatus.
        Parameters:
        statusCode - the status code
      • HttpStatusCodeException

        protected HttpStatusCodeException(HttpStatus statusCode,
                                          java.lang.String statusText)
        Construct a new instance with an HttpStatus and status text.
        Parameters:
        statusCode - the status code
        statusText - the status text
      • HttpStatusCodeException

        protected HttpStatusCodeException(HttpStatus statusCode,
                                          java.lang.String statusText,
                                          @Nullable
                                          byte[] responseBody,
                                          @Nullable
                                          java.nio.charset.Charset responseCharset)
        Construct instance with an HttpStatus, status text, and content.
        Parameters:
        statusCode - the status code
        statusText - the status text
        responseBody - the response body content, may be null
        responseCharset - the response body charset, may be null
        Since:
        3.0.5
      • HttpStatusCodeException

        protected HttpStatusCodeException(HttpStatus statusCode,
                                          java.lang.String statusText,
                                          @Nullable
                                          HttpHeaders responseHeaders,
                                          @Nullable
                                          byte[] responseBody,
                                          @Nullable
                                          java.nio.charset.Charset responseCharset)
        Construct instance with an HttpStatus, status text, content, and a response charset.
        Parameters:
        statusCode - the status code
        statusText - the status text
        responseHeaders - the response headers, may be null
        responseBody - the response body content, may be null
        responseCharset - the response body charset, may be null
        Since:
        3.1.2
    • Method Detail

      • getStatusCode

        public HttpStatus getStatusCode()
        Return the HTTP status code.