QtRestClient
3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
|
A class to perform requests to an API. More...
#include <restclass.h>
Public Member Functions | |
RestClient * | client () const |
Returns the rest client this class operates with. | |
RestClass * | subClass (const QString &path, QObject *parent=nullptr) const |
Creates a new rest class based on this one for the given path and parent. | |
virtual RequestBuilder | builder () const |
Creates a request builder for this class. More... | |
RestReply * | callRaw (const QByteArray &verb, const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QString &methodPath, const QCborValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QString &methodPath, const QJsonValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QCborValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QJsonValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QUrl &relativeUrl, const QCborValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
RestReply * | callRaw (const QByteArray &verb, const QUrl &relativeUrl, const QJsonValue &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs a API call of the given verb with CBOR or JSON data. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const QString &methodPath, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}, bool paramsAsBody=false) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | call (const QByteArray &verb, const QUrl &relativeUrl, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs an API call of the given verb with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | get (const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs GET-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | get (const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs GET-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | get (const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs GET-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | post (const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | post (const QString &methodPath, const RO &body, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | post (const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | post (const RO &body, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | post (const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | post (const QUrl &relativeUrl, const RO &body, const HeaderHash &headers={}) const |
Performs POST-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | put (const QString &methodPath, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PUT-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | put (const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PUT-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | put (const QUrl &relativeUrl, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PUT-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | deleteResource (const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs DELETE-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | deleteResource (const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs DELETE-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | deleteResource (const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs DELETE-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | patch (const QString &methodPath, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PATCH-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | patch (const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PATCH-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*, typename RO = QObject*> | |
GenericRestReply< DT, ET > * | patch (const QUrl &relativeUrl, const RO &body, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs PATCH-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | head (const QString &methodPath, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs HEAD-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | head (const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs HEAD-request with generic objects. More... | |
template<typename DT = QObject*, typename ET = QObject*> | |
GenericRestReply< DT, ET > * | head (const QUrl &relativeUrl, const QVariantHash ¶meters={}, const HeaderHash &headers={}) const |
Performs HEAD-request with generic objects. More... | |
Public Member Functions inherited from QObject | |
virtual const QMetaObject * | metaObject () const const |
QObject (QObject *parent) | |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
QString | objectName () const const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
bool | signalsBlocked () const const |
bool | blockSignals (bool block) |
QThread * | thread () const const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
void | killTimer (int id) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
const QObjectList & | children () const const |
void | setParent (QObject *parent) |
void | installEventFilter (QObject *filterObj) |
void | removeEventFilter (QObject *obj) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectTree () |
void | dumpObjectInfo () |
void | dumpObjectTree () const const |
void | dumpObjectInfo () const const |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const const |
QList< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
Q_CLASSINFO (Name, Value) | |
Q_INTERFACES (...) | |
Q_PROPERTY (...) | |
Q_ENUMS (...) | |
Q_FLAGS (...) | |
Q_ENUM (...) | |
Q_FLAG (...) | |
Q_ENUM_NS (...) | |
Q_FLAG_NS (...) | |
Q_OBJECT Q_OBJECT | |
Q_GADGET Q_GADGET | |
Q_NAMESPACE Q_NAMESPACE | |
Q_SIGNALS Q_SIGNALS | |
Q_SIGNAL Q_SIGNAL | |
Q_SLOTS Q_SLOTS | |
Q_SLOT Q_SLOT | |
Q_EMIT Q_EMIT | |
Q_INVOKABLE Q_INVOKABLE | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Static Public Member Functions | |
static QVariantHash | concatParams () |
A generic method to concatenate parameters into a QVariantHash. More... | |
template<typename... Args> | |
static QVariantHash | concatParams (const QString &key, const QVariant &value, Args... parameters) |
A generic method to concatenate parameters into a QVariantHash. More... | |
Static Public Member Functions inherited from QObject | |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
Static Public Attributes | |
static const QByteArray | GetVerb |
A constant for the HTTP-GET verb. | |
static const QByteArray | PostVerb |
A constant for the HTTP-POST verb. | |
static const QByteArray | PutVerb |
A constant for the HTTP-PUT verb. | |
static const QByteArray | DeleteVerb |
A constant for the HTTP-DELETE verb. | |
static const QByteArray | PatchVerb |
A constant for the HTTP-PATCH verb. | |
static const QByteArray | HeadVerb |
A constant for the HTTP-HEAD verb. | |
Additional Inherited Members | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QObject | |
QObject * | sender () const const |
int | senderSignalIndex () const const |
int | receivers (const char *signal) const const |
bool | isSignalConnected (const QMetaMethod &signal) const const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
Properties inherited from QObject | |
objectName | |
A class to perform requests to an API.
Definition at line 19 of file restclass.h.
|
virtual |
Creates a request builder for this class.
This builder simply adds the classes path to the builder of it's client.
If you need to set additional properties on the builder, that are not provided by the rest client you use , you can override this function. To preserve all the properties override as follows:
QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const QString & | methodPath, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 233 of file restclass.h.
GenericRestReply< DT, ET > * QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const QString & | methodPath, | ||
const RO & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 241 of file restclass.h.
GenericRestReply< DT, ET > * QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const QUrl & | relativeUrl, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 269 of file restclass.h.
GenericRestReply< DT, ET > * QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const QUrl & | relativeUrl, | ||
const RO & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 277 of file restclass.h.
GenericRestReply< DT, ET > * QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 251 of file restclass.h.
GenericRestReply< DT, ET > * QtRestClient::RestClass::call | ( | const QByteArray & | verb, |
const RO & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs an API call of the given verb with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
This basic version allows to perform genric calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
The body type RO
must be a serializable object type, i.e. Inherit QObject and be a pointer, or have the Q_GADGET macro. For the list overload, simply types are allowed as well. The reason is: whatever the result of the serialization is, it must be either a json object or a json array.
The same applies for DT
and ET
, for the reply.
Definition at line 259 of file restclass.h.
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QCborValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QJsonValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QString & | methodPath, | ||
const QCborValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QString & | methodPath, | ||
const QJsonValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QString & | methodPath, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QUrl & | relativeUrl, | ||
const QCborValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QUrl & | relativeUrl, | ||
const QJsonValue & | body, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QUrl & | relativeUrl, | ||
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
RestReply* QtRestClient::RestClass::callRaw | ( | const QByteArray & | verb, |
const QVariantHash & | parameters = {} , |
||
const HeaderHash & | headers = {} , |
||
bool | paramsAsBody = false |
||
) | const |
Performs a API call of the given verb with CBOR or JSON data.
verb | The HTTP-Verb to be used for the request |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The CBOR/JSON body to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
paramsAsBody | (optional) Pass the parameters as POST-parameter method body instead of as a query url parametery |
This basic version allows to perform low-level CBOR/JSON calls and replies. The following table shows, how the different path arguments can be used. The class base URL is http://api.example.com/test
for this example:
Parameter | value | requets URL |
---|---|---|
none | http://api.example.com/test | |
methodPath | myPath | http://api.example.com/test/myPath |
relativeUrl | ../prod | http://api.example.com/prod |
|
inlinestatic |
A generic method to concatenate parameters into a QVariantHash.
args | Variadic template arguments to allow any number of parameters |
key | The parameter name |
value | The parameters value |
parameters | additional parameters in the same style (optional) |
Instead of using this function, you can use the CONCAT_PARAMS macro. It's a simple shortcut for this method. You can use it as follows:
Definition at line 195 of file restclass.h.
|
static |
A generic method to concatenate parameters into a QVariantHash.
args | Variadic template arguments to allow any number of parameters |
key | The parameter name |
value | The parameters value |
parameters | additional parameters in the same style (optional) |
Instead of using this function, you can use the CONCAT_PARAMS macro. It's a simple shortcut for this method. You can use it as follows:
Definition at line 288 of file restclass.h.
|
inline |
Performs DELETE-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::DeleteVerb, ...)
. It's a shortcut for DELETE-requests. Check the documentation fo call for more details.
Definition at line 144 of file restclass.h.
|
inline |
Performs DELETE-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::DeleteVerb, ...)
. It's a shortcut for DELETE-requests. Check the documentation fo call for more details.
Definition at line 152 of file restclass.h.
|
inline |
Performs DELETE-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::DeleteVerb, ...)
. It's a shortcut for DELETE-requests. Check the documentation fo call for more details.
Definition at line 148 of file restclass.h.
|
inline |
Performs GET-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::GetVerb, ...)
. It's a shortcut for GET-requests. Check the documentation fo call for more details.
Definition at line 82 of file restclass.h.
|
inline |
Performs GET-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::GetVerb, ...)
. It's a shortcut for GET-requests. Check the documentation fo call for more details.
Definition at line 90 of file restclass.h.
|
inline |
Performs GET-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::GetVerb, ...)
. It's a shortcut for GET-requests. Check the documentation fo call for more details.
Definition at line 86 of file restclass.h.
|
inline |
Performs HEAD-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::HeadVerb, ...)
. It's a shortcut for HEAD-requests. Check the documentation fo call for more details.
Definition at line 176 of file restclass.h.
|
inline |
Performs HEAD-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::HeadVerb, ...)
. It's a shortcut for HEAD-requests. Check the documentation fo call for more details.
Definition at line 184 of file restclass.h.
|
inline |
Performs HEAD-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this requestA wrapper that calls call(RestClass::HeadVerb, ...)
. It's a shortcut for HEAD-requests. Check the documentation fo call for more details.
Definition at line 180 of file restclass.h.
|
inline |
Performs PATCH-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PatchVerb, ...)
. It's a shortcut for PATCH-requests. Check the documentation fo call for more details.
Definition at line 160 of file restclass.h.
|
inline |
Performs PATCH-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PatchVerb, ...)
. It's a shortcut for PATCH-requests. Check the documentation fo call for more details.
Definition at line 168 of file restclass.h.
|
inline |
Performs PATCH-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PatchVerb, ...)
. It's a shortcut for PATCH-requests. Check the documentation fo call for more details.
Definition at line 164 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 98 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 102 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 116 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 120 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 107 of file restclass.h.
|
inline |
Performs POST-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | (optional) The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PostVerb, ...)
. It's a shortcut for POST-requests. Check the documentation fo call for more details.
Definition at line 111 of file restclass.h.
|
inline |
Performs PUT-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PutVerb, ...)
. It's a shortcut for PUT-requests. Check the documentation fo call for more details.
Definition at line 128 of file restclass.h.
|
inline |
Performs PUT-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PutVerb, ...)
. It's a shortcut for PUT-requests. Check the documentation fo call for more details.
Definition at line 136 of file restclass.h.
|
inline |
Performs PUT-request with generic objects.
DT | The expected type of the reply to this request. Defaults to QObject* |
ET | A type to be used for replies with an error. Defaults to QObject* |
RO | The type of the data specified with the body parameter |
methodPath | (optional) The path to added to the classes base URL |
relativeUrl | (optional) A URL to be resolved relative to the classes base URL, use as URl for the request |
body | The body object to be sent together with the request |
parameters | A collection of query parameters to be added to the request URL |
headers | Additional HTTP-headers to be added to the request |
DT
and ET
, to handle the reply to this request QJsonSerializationException | Will be thrown, if the body cannot be serializer to JSON |
A wrapper that calls call(RestClass::PutVerb, ...)
. It's a shortcut for PUT-requests. Check the documentation fo call for more details.
Definition at line 132 of file restclass.h.