[Qt-interest] Help Required to Perform HTTP Put using QNetworkAccessManger

Gargi Das gargidas19188 at gmail.com
Wed Dec 1 06:57:24 CET 2010


Hello All,

I want to do simple http put using QNetworkAccessManager but i am unable to
achieve that, following is the code i am using.

    QNetworkRequest request(QUrl("my url"));
    QByteArray data;
    QUrl param;
    param.addEncodedQueryItem("user_credentials",singleaccesstoken.toAscii());
    param.addEncodedQueryItem("login","username");
    param.addEncodedQueryItem("password","pwd");

    data.append(param.toString().toAscii());
    data.remove(0,1);

    nam->put(request,data);




whrere nam is a QNetworkAccessManger, in the reply of the this request
i should get a success ful xml but instead i get a vague html login
page.

Can any body help me regarding this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101201/f85eb271/attachment.html 


More information about the Qt-interest-old mailing list