Skip to content

Commit 57cec89

Browse files
committed
Improve javadoc for bean(), list() and stream() methods
1 parent 8f28d29 commit 57cec89

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

client/src/main/java/io/avaje/http/client/HttpAsyncResponse.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public interface HttpAsyncResponse {
106106
/**
107107
* Process expecting a bean response body (typically from json content).
108108
* <p>
109-
* If the HTTP statusCode is 300 or above a HttpException is throw
110-
* which contains the HttpResponse. This is the cause in the
111-
* CompletionException.
109+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
110+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
111+
* by default followed apart from HTTPS to HTTP.
112112
*
113113
* <pre>{@code
114114
*
@@ -141,9 +141,9 @@ public interface HttpAsyncResponse {
141141
/**
142142
* Process expecting a list of beans response body (typically from json content).
143143
* <p>
144-
* If the HTTP statusCode is 300 or above a HttpException is throw
145-
* which contains the HttpResponse. This is the cause in the
146-
* CompletionException.
144+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
145+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
146+
* by default followed apart from HTTPS to HTTP.
147147
*
148148
* <pre>{@code
149149
*
@@ -181,9 +181,9 @@ public interface HttpAsyncResponse {
181181
* may not be available at the time of the callback. As such {@link RequestLogger}
182182
* will not include response content in logging stream request/response.
183183
* <p>
184-
* If the HTTP statusCode is 300 or above a HttpException is throw
185-
* which contains the HttpResponse. This is the cause in the
186-
* CompletionException.
184+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
185+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
186+
* by default followed apart from HTTPS to HTTP.
187187
*
188188
* <pre>{@code
189189
*

client/src/main/java/io/avaje/http/client/HttpClientResponse.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public interface HttpClientResponse {
2929

3030
/**
3131
* Return the response as a single bean.
32+
* <p>
33+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
34+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
35+
* by default followed apart from HTTPS to HTTP.
3236
*
3337
* @param type The type of the bean to convert the response content into.
3438
* @param <T> The type that the content is converted to.
@@ -39,6 +43,10 @@ public interface HttpClientResponse {
3943

4044
/**
4145
* Return the response as a list of beans.
46+
* <p>
47+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
48+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
49+
* by default followed apart from HTTPS to HTTP.
4250
*
4351
* @param type The type of the bean to convert the response content into.
4452
* @param <T> The type that the content is converted to.
@@ -57,6 +65,10 @@ public interface HttpClientResponse {
5765
* 'loggable' by avaje-http-client. This is because the entire response
5866
* may not be available at the time of the callback. As such {@link RequestLogger}
5967
* will not include response content when logging stream request/response
68+
* <p>
69+
* If the HTTP statusCode is 300 or above a HttpException is throw which contains
70+
* the HttpResponse. This is the cause in the CompletionException. Redirects are
71+
* by default followed apart from HTTPS to HTTP.
6072
*
6173
* @param type The type of the bean to convert the response content into.
6274
* @param <T> The type that the content is converted to.
@@ -87,6 +99,8 @@ public interface HttpClientResponse {
8799

88100
/**
89101
* Return the response discarding the response content.
102+
* <p>
103+
* Unlike {@link #asVoid()} this does not check the response status code.
90104
*/
91105
HttpResponse<Void> asDiscarding();
92106

0 commit comments

Comments
 (0)