summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp65
1 files changed, 32 insertions, 33 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index cd736c8..802e603 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()
*/