- URLConnection *con = url->openConnection();
- HttpURLConnection *http = (HttpURLConnection *) con;
- http->setRequestMethod("POST");
- http->setFixedLengthStreamingMode(chars->length);
- http->setDoOutput(true);
- http->setConnectTimeout(CloudComm_TIMEOUT_MILLIS);
- http->setReadTimeout(CloudComm_TIMEOUT_MILLIS);
- http->connect();
- OutputStream *os = http->getOutputStream();
- os->write(chars);
- os->flush();
+ fd = openURL(url, true);
+ writeURLData(fd, chars);