diff options
author | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-20 11:13:28 (GMT) |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-20 11:13:42 (GMT) |
commit | 19c8e9b133abe02199e57682a7bbd6df51b17cac (patch) | |
tree | b6ca6b5215baf2100d2d97c0a8ec754b96744d9e /src/network | |
parent | 74a6ab4e1c7db31eebab3bdef1baf376fce84ae0 (diff) | |
download | Qt-19c8e9b133abe02199e57682a7bbd6df51b17cac.zip Qt-19c8e9b133abe02199e57682a7bbd6df51b17cac.tar.gz Qt-19c8e9b133abe02199e57682a7bbd6df51b17cac.tar.bz2 |
Doc: some rephrasing and fixing
Reviewed-by: Thiago
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 907aaef..61e5601 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -540,10 +540,10 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar) } /*! - This function is used to post a request to obtain the network - headers for \a request. It takes its name after the HTTP request - associated (HEAD). It returns a new QNetworkReply object which - will contain such headers. + Posts a request to obtain the network headers for \a request + and returns a new QNetworkReply object which will contain such headers + + The function is named after the HTTP request associated (HEAD). */ QNetworkReply *QNetworkAccessManager::head(const QNetworkRequest &request) { @@ -551,11 +551,12 @@ QNetworkReply *QNetworkAccessManager::head(const QNetworkRequest &request) } /*! - This function is used to post a request to obtain the contents of - the target \a request. It will cause the contents to be - downloaded, along with the headers associated with it. It returns - a new QNetworkReply object opened for reading which emits its - QIODevice::readyRead() signal whenever new data arrives. + Posts a request to obtain the contents of the target \a request + and returns a new QNetworkReply object opened for reading which emits the + \l{QIODevice::readyRead()}{readyRead()} signal whenever new data + arrives. + + The contents as well as associated headers will be downloaded. \sa post(), put(), deleteResource() */ @@ -565,18 +566,15 @@ QNetworkReply *QNetworkAccessManager::get(const QNetworkRequest &request) } /*! - This function is used to send an HTTP POST request to the - destination specified by \a request. The contents of the \a data + Sends an HTTP POST request to the destination specified by \a request + and returns a new QNetworkReply object opened for reading that will + contain the reply sent by the server. The contents of the \a data device will be uploaded to the server. - \a data must be opened for reading when this function is called - and must remain valid until the finished() signal is emitted for - this reply. - - The returned QNetworkReply object will be open for reading and - will contain the reply sent by the server to the POST request. + \a data must be open for reading and must remain valid until the + finished() signal is emitted for this reply. - Note: sending a POST request on protocols other than HTTP and + \note Sending a POST request on protocols other than HTTP and HTTPS is undefined and will probably fail. \sa get(), put(), deleteResource() @@ -588,8 +586,9 @@ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, QIODe /*! \overload - This function sends the contents of the \a data byte array to the - destination specified by \a request. + + Sends the contents of the \a data byte array to the destination + specified by \a request. */ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, const QByteArray &data) { @@ -603,20 +602,19 @@ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, const } /*! - This function is used to upload the contents of \a data to the - destination \a request. + Uploads the contents of \a data to the destination \a request and + returnes a new QNetworkReply object that will be open for reply. \a data must be opened for reading when this function is called and must remain valid until the finished() signal is emitted for this reply. - The returned QNetworkReply object will be open for reply, but - whether anything will be available for reading is protocol - dependent. For HTTP, the server may send a small HTML page - indicating the upload was successful (or not). Other protocols - will probably have content in their replies. + Whether anything will be available for reading from the returned + object is protocol dependent. For HTTP, the server may send a + small HTML page indicating the upload was successful (or not). + Other protocols will probably have content in their replies. - For HTTP, this request will send a PUT request, which most servers + \note For HTTP, this request will send a PUT request, which most servers do not allow. Form upload mechanisms, including that of uploading files through HTML forms, use the POST mechanism. @@ -629,8 +627,8 @@ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, QIODev /*! \overload - This function sends the contents of the \a data byte array to the - destination specified by \a request. + Sends the contents of the \a data byte array to the destination + specified by \a request. */ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, const QByteArray &data) { @@ -646,9 +644,10 @@ QNetworkReply *QNetworkAccessManager::put(const QNetworkRequest &request, const /*! \since 4.6 - This function is used to send a request to delete the resource - identified by the URL of \a request. - This feature is currently available for HTTP only, performing an HTTP DELETE request. + Sends a request to delete the resource identified by the URL of \a request. + + \note This feature is currently available for HTTP only, performing an + HTTP DELETE request. \sa get(), post(), put() */ |