code: public HttpURLConnection upload(String writeKey) throws IOException {
      HttpURLConnection connection = openConnection("https://api.segment.io/v1/import");
      connection.setRequestProperty("Authorization", authorizationHeader(writeKey));
      connection.setRequestProperty("Content-Encoding", "gzip");
      connection.setDoOutput(true);
      connection.setChunkedStreamingMode(0);
      return connection;
    }
docs: Return a {@link HttpURLConnection} that writes batched payloads to {@code
  https://api.segment.io/v1/import}.