Skip to content

Commit 19f0a5e

Browse files
committed
Update javadoc for stream() mentioning that the response content is not included in logging (as it is reactively being populated so can not be available at response logging time)
1 parent 780e63d commit 19f0a5e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ public interface HttpAsyncResponse {
173173
/**
174174
* Process response as a stream of beans (x-json-stream).
175175
* <p>
176+
* Typically the response is expected to be {@literal application/x-json-stream}
177+
* newline delimited json payload.
178+
* <p>
179+
* Note that for this stream request the response content is not deemed
180+
* 'loggable' by avaje-http-client. This is because the entire response
181+
* may not be available at the time of the callback. As such {@link RequestLogger}
182+
* will not include response content in logging stream request/response.
183+
* <p>
176184
* If the HTTP statusCode is 300 or above a HttpException is throw
177185
* which contains the HttpResponse. This is the cause in the
178186
* CompletionException.

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@ public interface HttpClientResponse {
5050
/**
5151
* Return the response as a stream of beans.
5252
* <p>
53-
* Typically the response is expected to be {@literal applciation/x-json-stream}
53+
* Typically the response is expected to be {@literal application/x-json-stream}
5454
* newline delimited json payload.
55+
* <p>
56+
* Note that for this stream request the response content is not deemed
57+
* 'loggable' by avaje-http-client. This is because the entire response
58+
* may not be available at the time of the callback. As such {@link RequestLogger}
59+
* will not include response content when logging stream request/response
5560
*
5661
* @param type The type of the bean to convert the response content into.
5762
* @param <T> The type that the content is converted to.

0 commit comments

Comments
 (0)