+ *@brief Sends route to the server in xml format.
+ *Send authentication information in the header.
+ *@todo Check destination URL.
+ */
+void HttpClient::sendRouteXml()
+{
+ qDebug() << "_sendRouteXml";
+
+ QString filename = "route.xml";
+ QFile file(filename);
+ if (!file.open(QFile::ReadOnly)) {
+ qDebug() << "_sendRouteXml file.open() fail";
+ return;
+ }
+
+ QUrl qurl("http://api.speedfreak-app.com/api/update/route");
+ qDebug() << qurl.toString();
+ QNetworkRequest request(qurl);
+ QNetworkReply *currentDownload;
+
+ QString credentials = myMainw->settingsDialog->getUserName() + ":" + myMainw->settingsDialog->getPassword();
+ credentials = "Basic " + credentials.toAscii().toBase64();
+ request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
+
+ currentDownload = netManager->post(request, ("xml=" + file.readAll()));
+ connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRoute()));
+ //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
+ myMainw->routeDialog->setLabelInfoToUser("Sending route to server");
+
+ file.close();
+}
+
+/**