src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java
branchhttp-client-branch
changeset 55810 7fd3589d3388
parent 55764 34d7cc00f87a
child 55837 0262f29eef0d
equal deleted inserted replaced
55809:b8fefba89929 55810:7fd3589d3388
   120      * @return the response headers
   120      * @return the response headers
   121      */
   121      */
   122     public abstract HttpHeaders headers();
   122     public abstract HttpHeaders headers();
   123 
   123 
   124     /**
   124     /**
   125      * Returns the received response trailers, if there are any, when they
       
   126      * become available. For many response subscriber types this will be at the
       
   127      * same time as the {@code HttpResponse} itself is available. In such cases,
       
   128      * the returned {@code CompletableFuture} will be already completed.
       
   129      *
       
   130      * @return a CompletableFuture of the response trailers (may be empty)
       
   131      */
       
   132     public abstract CompletableFuture<HttpHeaders> trailers();
       
   133 
       
   134     /**
       
   135      * Returns the body. Depending on the type of {@code T}, the returned body
   125      * Returns the body. Depending on the type of {@code T}, the returned body
   136      * may represent the body after it was read (such as {@code byte[]}, or
   126      * may represent the body after it was read (such as {@code byte[]}, or
   137      * {@code String}, or {@code Path}) or it may represent an object with
   127      * {@code String}, or {@code Path}) or it may represent an object with
   138      * which the body is read, such as an {@link java.io.InputStream}.
   128      * which the body is read, such as an {@link java.io.InputStream}.
   139      *
   129      *