ok.
int QHttp::request ( const QHttpRequestHeader & header, QIODevice * data = 0, QIODevice * to = 0 )
can you explain the function in a better way, than the explanation that is present in Qt Documentation?
what should i assign in the QHttpRequestHeader and in QIODevice?
this is the request header
string.append(":");
string.append("12345");
QString converted
= string.
toBase64();
//qDebug() <<"String"<< string<<"converted" <<converted ;
QUrl url
(lineEdit
->text
());
http.setHost(url.host());
connectionId = http.get(url.path());
QByteArray string ("username");
string.append(":");
string.append("12345");
QString converted = string.toBase64();
//qDebug() <<"String"<< string<<"converted" <<converted ;
QUrl url(lineEdit->text());
http.setHost(url.host());
connectionId = http.get(url.path());
To copy to clipboard, switch view to plain text mode
this is the data that has to be sent along with the header.
void MainWindow::sendrequest()
{
doc.appendChild(root);
root.appendChild(tag);
tag.appendChild(t);
}
void MainWindow::sendrequest()
{
QDomDocument doc("request");
QDomElement root = doc.createElement("request");
doc.appendChild(root);
QDomElement tag = doc.createElement("call");
root.appendChild(tag);
QDomText t = doc.createTextNode("abc");
tag.appendChild(t);
QString xml = doc.toString();
}
To copy to clipboard, switch view to plain text mode
can u help me as how I should call the request function??
Will using QNetworkAccessManager for the request and response from a webpage, be easier?
thanks
Bookmarks