code: public void writeToFile(Path path) {
          try {
              try (OutputStream os = Files.newOutputStream(path)) {
                  InputStreams.transferTo(body(), os);
              }
          } catch (IOException e) {
              throw new RequestsException(e);
          } finally {
              close();
          }
      }
docs: Write response body to file