Logo Search packages:      
Sourcecode: qnapi version File versions  Download package

SyncHTTP Class Reference

#include <synchttp.h>

List of all members.

Detailed Description

Provide a synchronous api over QHttp Uses a QEventLoop to block until the request is completed
Iulian M <eti@erata.net>

Definition at line 36 of file synchttp.h.

Public Member Functions

bool syncGet (const QString &path, QIODevice *to=0)
 send GET request and wait until finished
 SyncHTTP (const QString &hostName, quint16 port=80, QObject *parent=0)
 SyncHTTP (QObject *parent=0)
bool syncPost (const QString &path, const QByteArray &data, QIODevice *to=0)
bool syncPost (const QString &path, QIODevice *data, QIODevice *to=0)
 send POST request and wait until finished
bool syncRequest (const QHttpRequestHeader &header, const QByteArray &data, QIODevice *to=0)
bool syncRequest (const QHttpRequestHeader &header, QIODevice *data, QIODevice *to=0)

Protected Slots

virtual void finished (int idx, bool err)

Private Attributes

QEventLoop loop
 event loop used to block until request finished
int requestID
 id of current request
bool status
 error status of current request

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index