org.springframework.web.client

Class HttpClientErrorException

    • Constructor Detail

      • HttpClientErrorException

        public HttpClientErrorException(HttpStatus statusCode)
        Constructor with a status code only.
      • HttpClientErrorException

        public HttpClientErrorException(HttpStatus statusCode,
                                        java.lang.String statusText)
        Constructor with a status code and status text.
      • HttpClientErrorException

        public HttpClientErrorException(HttpStatus statusCode,
                                        java.lang.String statusText,
                                        @Nullable
                                        byte[] body,
                                        @Nullable
                                        java.nio.charset.Charset responseCharset)
        Constructor with a status code and status text, and content.
      • HttpClientErrorException

        public HttpClientErrorException(HttpStatus statusCode,
                                        java.lang.String statusText,
                                        @Nullable
                                        HttpHeaders headers,
                                        @Nullable
                                        byte[] body,
                                        @Nullable
                                        java.nio.charset.Charset responseCharset)
        Constructor with a status code and status text, headers, and content.
    • Method Detail

      • create

        public static HttpClientErrorException create(HttpStatus statusCode,
                                                      java.lang.String statusText,
                                                      HttpHeaders headers,
                                                      byte[] body,
                                                      @Nullable
                                                      java.nio.charset.Charset charset)
        Create HttpClientErrorException or an HTTP status specific sub-class.
        Since:
        5.1