|
TreeFrogFramework 2.10
|
#include <thttpclient.h>
Public Member Functions | |
| THttpClient () | |
| ~THttpClient () | |
| QNetworkReply * | get (const QUrl &url, int msecs=5000) |
| QNetworkReply * | get (const QNetworkRequest &request, int msecs=5000) |
| QNetworkReply * | post (const QUrl &url, const QJsonDocument &json, int msecs=5000) |
| QNetworkReply * | post (const QNetworkRequest &request, const QByteArray &data, int msecs=5000) |
| QNetworkReply * | put (const QUrl &url, const QJsonDocument &json, int msecs=5000) |
| QNetworkReply * | put (const QNetworkRequest &request, const QByteArray &data, int msecs=5000) |
| QNetworkReply * | deleteResource (const QUrl &url, int msecs=5000) |
| QNetworkReply * | deleteResource (const QNetworkRequest &request, int msecs=5000) |
| QNetworkAccessManager * | manager () |
The THttpClient class can send HTTP requests to another server and receive replies.
| THttpClient::THttpClient | ( | ) |
| THttpClient::~THttpClient | ( | ) |
| QNetworkReply * THttpClient::deleteResource | ( | const QNetworkRequest & | request, |
| int | msecs = 5000 |
||
| ) |
Sends a request to delete the resource identified by the URL of request.
| QNetworkReply * THttpClient::deleteResource | ( | const QUrl & | url, |
| int | msecs = 5000 |
||
| ) |
Sends a request to delete the resource identified by the URL url.
| QNetworkReply * THttpClient::get | ( | const QNetworkRequest & | request, |
| int | msecs = 5000 |
||
| ) |
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object opened for reading.
| QNetworkReply * THttpClient::get | ( | const QUrl & | url, |
| int | msecs = 5000 |
||
| ) |
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object opened for reading.
|
inline |
| QNetworkReply * THttpClient::post | ( | const QNetworkRequest & | request, |
| const QByteArray & | data, | ||
| int | msecs = 5000 |
||
| ) |
Sends an HTTP POST request to the destination specified by request and returns a new QNetworkReply object opened for reading.
| QNetworkReply * THttpClient::post | ( | const QUrl & | url, |
| const QJsonDocument & | json, | ||
| int | msecs = 5000 |
||
| ) |
Sends an HTTP POST request to the destination specified by url and returns a new QNetworkReply object opened for reading.
| QNetworkReply * THttpClient::put | ( | const QNetworkRequest & | request, |
| const QByteArray & | data, | ||
| int | msecs = 5000 |
||
| ) |
Uploads the contents of data to the destination request and returns a new QNetworkReply object that will be open for reply.
| QNetworkReply * THttpClient::put | ( | const QUrl & | url, |
| const QJsonDocument & | json, | ||
| int | msecs = 5000 |
||
| ) |
Uploads the contents of json to the destination url and returns a new QNetworkReply object that will be open for reply.