Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

int QHttp::head ( const QString path  ) 

Sends a header request for path to the server set by setHost() or as specified in the constructor.

path must be an absolute path like /index.html or an absolute URI like http://www.trolltech.com/index.html.

The function does not block and returns immediately. The request is scheduled, and its execution is performed asynchronously. The function returns a unique identifier which is passed by requestStarted() and requestFinished().

When the request is started the requestStarted() signal is emitted. When it is finished the requestFinished() signal is emitted.

See also:
setHost() get() post() request() requestStarted() requestFinished() done()

Definition at line 2083 of file qhttp.cpp.

References QHttpHeader::setValue().

{
    Q_D(QHttp);
    QHttpRequestHeader header("HEAD", path);
    header.setValue("Connection", "Keep-Alive");
    return d->addRequest(new QHttpPGHRequest(header, (QIODevice*)0, 0));
}


Generated by  Doxygen 1.6.0   Back to index