Skip to content

Commit

Permalink
Fix Response#hasResponseBody javadoc, close #1570
Browse files Browse the repository at this point in the history
  • Loading branch information
slandelle committed Aug 27, 2018
1 parent a6d1cd2 commit a3b1454
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions client/src/main/java/org/asynchttpclient/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,15 @@ public interface Response {
boolean hasResponseHeaders();

/**
* 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)}
* or {@link AsyncHandler#onHeadersReceived(HttpHeaders)} returned {@link AsyncHandler.State#ABORT}
*
* @return true if the response's body has been computed by an {@link AsyncHandler}
* Return true if the response's body has been computed by an {@link AsyncHandler}.
* It will return false if:
* <ul>
* <li>either the {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} returned {@link AsyncHandler.State#ABORT}</li>
* <li>or {@link AsyncHandler#onHeadersReceived(HttpHeaders)} returned {@link AsyncHandler.State#ABORT}</li>
* <li>response body was empty</li>
* </ul>
*
* @return true if the response's body has been computed by an {@link AsyncHandler} to new empty bytes
*/
boolean hasResponseBody();

Expand Down

0 comments on commit a3b1454

Please sign in to comment.