diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java index b3b08c2350..f0ecff26eb 100644 --- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,8 @@ import org.springframework.http.HttpStatus; /** * Represents a client-side HTTP response. - * Obtained via an calling of the {@link ClientHttpRequest#execute()}. + * + *

Obtained via an invocation of {@link ClientHttpRequest#execute()}. * *

A {@code ClientHttpResponse} must be {@linkplain #close() closed}, * typically in a {@code finally} block. @@ -35,7 +36,9 @@ import org.springframework.http.HttpStatus; public interface ClientHttpResponse extends HttpInputMessage, Closeable { /** - * Return the HTTP status code as an {@link HttpStatus} enum value. + * Get the HTTP status code as an {@link HttpStatus} enum value. + *

For status codes not supported by {@code HttpStatus}, use + * {@link #getRawStatusCode()} instead. * @return the HTTP status as an HttpStatus enum value (never {@code null}) * @throws IOException in case of I/O errors * @throws IllegalArgumentException in case of an unknown HTTP status code @@ -45,7 +48,7 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable { HttpStatus getStatusCode() throws IOException; /** - * Return the HTTP status code (potentially non-standard and not + * Get the HTTP status code (potentially non-standard and not * resolvable through the {@link HttpStatus} enum) as an integer. * @return the HTTP status as an integer value * @throws IOException in case of I/O errors @@ -56,7 +59,7 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable { int getRawStatusCode() throws IOException; /** - * Return the HTTP status text of the response. + * Get the HTTP status text of the response. * @return the HTTP status text * @throws IOException in case of I/O errors */