Skip to content

Commit a3b1454

Browse files
committed
Fix Response#hasResponseBody javadoc, close #1570
1 parent a6d1cd2 commit a3b1454

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Diff for: client/src/main/java/org/asynchttpclient/Response.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,15 @@ public interface Response {
147147
boolean hasResponseHeaders();
148148

149149
/**
150-
* Return true if the response's body has been computed by an {@link AsyncHandler}. It will return false if the either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)}
151-
* or {@link AsyncHandler#onHeadersReceived(HttpHeaders)} returned {@link AsyncHandler.State#ABORT}
152-
*
153-
* @return true if the response's body has been computed by an {@link AsyncHandler}
150+
* Return true if the response's body has been computed by an {@link AsyncHandler}.
151+
* It will return false if:
152+
* <ul>
153+
* <li>either the {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} returned {@link AsyncHandler.State#ABORT}</li>
154+
* <li>or {@link AsyncHandler#onHeadersReceived(HttpHeaders)} returned {@link AsyncHandler.State#ABORT}</li>
155+
* <li>response body was empty</li>
156+
* </ul>
157+
*
158+
* @return true if the response's body has been computed by an {@link AsyncHandler} to new empty bytes
154159
*/
155160
boolean hasResponseBody();
156161

0 commit comments

Comments
 (0)