Posts Tagged ‘ rest ’

Rest client with Qt 4.5

It’s very easy to call a rest service from qt, even with authentication,
using QtNetwork/QNetworkAccessManager class

Using the previous rest servlet sample.

    QNetworkAccessManager *manager = new QNetworkAccessManager(this);

    QObject::connect(manager, SIGNAL(finished(QNetworkReply *)),
                              SLOT(slotRequestFinished(QNetworkReply *)));

    QNetworkRequest request;
    request.setRawHeader("Authorization", "Basic " +
    request.setHeader(QNetworkRequest::ContentTypeHeader, "text/xml");

    QNetworkReply *reply = 0;
    reply = manager->get(request);

    QObject::connect(reply, SIGNAL(downloadProgress(qint64,qint64)),

Continue reading


Restlet with Spring

My first post is about to write a very simple authenticated rest server with :

An easy way to try this sample rest servlet is with jetty (
and the maven-jetty-plugin

We can use curl to make a rest request (

Continue reading