Class NetworkManager
#include <networkmanager.h>
Public Static Functions
| Type | Name |
|---|---|
| NetworkReply * | deleteResource (const QNetworkRequest & request, const QByteArray & payload=QByteArray()) |
| NetworkReply * | get (const QNetworkRequest & request) |
| NetworkReply * | post (const QNetworkRequest & request, const QByteArray & payload=QByteArray()) |
| NetworkReply * | post (const QNetworkRequest & request, QHttpMultiPart * payload) |
| NetworkReply * | put (const QNetworkRequest & request, const QByteArray & payload=QByteArray()) |
| NetworkReply * | put (const QNetworkRequest & request, QHttpMultiPart * payload) |
Detailed Description
NetworkManager is used to make reliable and retriable network requests. It wraps around QgsNetworkAccessManager.
Note:
After the request has finished, it is the responsibility of the user to delete the NetworkReply object at an appropriate time.
Note:
Do not directly delete it inside the slot connected to finished(). You can use the deleteLater() function.
Public Static Functions Documentation
function deleteResource
static NetworkReply * NetworkManager::deleteResource (
const QNetworkRequest & request,
const QByteArray & payload=QByteArray()
)
makes HTTP DELETE request with an optional payload and returns a reply
function get
static NetworkReply * NetworkManager::get (
const QNetworkRequest & request
)
makes HTTP GET request and returns a reply.
function post [1/2]
static NetworkReply * NetworkManager::post (
const QNetworkRequest & request,
const QByteArray & payload=QByteArray()
)
makes HTTP POST request with an optional payload and returns a reply
function post [2/2]
static NetworkReply * NetworkManager::post (
const QNetworkRequest & request,
QHttpMultiPart * payload
)
makes HTTP POST request with a multipart payload and returns a reply
function put [1/2]
static NetworkReply * NetworkManager::put (
const QNetworkRequest & request,
const QByteArray & payload=QByteArray()
)
makes HTTP PUT request with an optional payload and returns a reply
function put [2/2]
static NetworkReply * NetworkManager::put (
const QNetworkRequest & request,
QHttpMultiPart * payload
)
makes HTTP PUT request with a multipart payload and returns a reply
The documentation for this class was generated from the following file src/core/qfieldcloud/networkmanager.h