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

bool SyncHTTP::syncPost ( const QString &  path,
QIODevice *  data,
QIODevice *  to = 0 
) [inline]

send POST request and wait until finished

connect the requestFinished signal to our finished slot

start the request and store the requestID

block until the request is finished

return the request status

Definition at line 63 of file synchttp.h.

References finished(), loop, requestID, and status.

Referenced by syncPost().

            {
                  ///connect the requestFinished signal to our finished slot
                  connect(this,SIGNAL(requestFinished(int,bool)),SLOT(finished(int,bool)));
                  /// start the request and store the requestID
                  requestID = post(path, data , to);
                  /// block until the request is finished
                  loop.exec();
                  /// return the request status
                  return status;
            }


Generated by  Doxygen 1.6.0   Back to index