Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8240921

Minor correction to HttpResponse.BodySubscribers example

    XMLWordPrintable

Details

    • b16
    • Not verified

    Description

      A DESCRIPTION OF THE PROBLEM :
      The first example of usage of the class java.net.http.HttpResponse.BodySubscribers states: "// Streams the response body to a File" but the subsequent code does instead accumulate the response body as a byte array.
      Expected something like:
      HttpResponse<Path> response =client.send(request, responseInfo -> BodySubscribers.ofFile(path));


      Attachments

        Activity

          People

            ryadav Rahul Yadav
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: