|
XX CMake Package
|
Asynchronous REST API client. More...
#include <XXRestApiAsync.h>
Asynchronous REST API client.
Public Types | |
| using | CallbackFunction = std::function<void(Result result)> |
Public Member Functions | |
| Async (QObject *parent, const QString &baseUrl) | |
| virtual void | getAsync (CallbackFunction callback, const QString &endpoint, const QUrlQuery ¶ms=QUrlQuery()) |
| virtual void | postAsync (CallbackFunction callback, const QString &endpoint, const QJsonObject &payload=QJsonObject(), const QUrlQuery ¶ms=QUrlQuery()) |
| virtual void | putAsync (CallbackFunction callback, const QString &endpoint, const QJsonObject &payload=QJsonObject(), const QUrlQuery ¶ms=QUrlQuery()) |
| Public Member Functions inherited from XX::RestApi::Blocking | |
| Blocking (QObject *parent, const QString &baseUrl) | |
| virtual Result | get (const QString &endpoint, const QUrlQuery ¶ms=QUrlQuery()) const |
| virtual ResultRaw | getRaw (const QString &endpoint, const QUrlQuery ¶ms=QUrlQuery()) const |
| virtual Result | post (const QString &endpoint, const QJsonObject &payload=QJsonObject(), const QUrlQuery ¶ms=QUrlQuery()) const |
| virtual Result | put (const QString &endpoint, const QJsonObject &payload=QJsonObject(), const QUrlQuery ¶ms=QUrlQuery()) const |
| void | setAuthProvider (AuthProvider::Token *newProvider) |
| void | setBaseUrl (const QString &url) |
| const QString & | getBaseUrl () const |
| Public Member Functions inherited from XX::Network::Settings | |
| Settings () | |
| void | setVerbose (bool enabled) |
| bool | verbose () const |
Additional Inherited Members | |
| Static Public Member Functions inherited from XX::Network::Settings | |
| static void | setUseExceptions (bool enabled) |
| static bool | useExceptions () |
| Protected Types inherited from XX::RestApi::Blocking | |
| using | ReplyGeneratorFunction = std::function<QNetworkReply*(QNetworkRequest request)> |
| Protected Member Functions inherited from XX::RestApi::Blocking | |
| void | addUnauthorizedStatusCode (int code) |
| QNetworkRequest | createRequest (const QString &endpoint, const QUrlQuery ¶ms) const |
| Protected Attributes inherited from XX::RestApi::Blocking | |
| QNetworkAccessManager * | manager |
| QList< int > | successStatusCodes |
| QList< int > | unauthorizedStatusCodes |
| AuthProvider::Token * | provider |
| QString | baseUrl |
| using XX::RestApi::Async::CallbackFunction = std::function<void(Result result)> |
| XX::RestApi::Async::Async | ( | QObject * | parent, |
| const QString & | baseUrl ) |
|
virtual |
|
virtual |
|
virtual |