8#include <QtNetwork/qnetworkreply.h>
10#include <QtCore/qpointer.h>
19struct QJsonParseError;
32 d(
std::exchange(other.d,
nullptr))
45 Q_NETWORK_EXPORT QByteArray
readBody();
55 Q_NETWORK_EXPORT
bool hasError()
const;
60#ifndef QT_NO_DEBUG_STREAM
63 QPointer<QNetworkReply> wrapped;
68Q_DECLARE_SHARED(QRestReply)
~QRestAccessManagerPrivate() override
QRestAccessManagerPrivate()
QNetworkReply * executeRequest(ReqOpRef requestOperation, const QObject *context, QtPrivate::QSlotObjectBase *rawSlot)
bool deletesRepliesOnFinished
QHash< QNetworkReply *, CallerInfo > activeRequests
QNetworkReply * executeRequest(ReqOpRefJson requestOperation, const QJsonDocument &jsonDoc, const QNetworkRequest &request, const QObject *context, QtPrivate::QSlotObjectBase *rawSlot)
QNetworkAccessManager * qnam
void handleReplyFinished(QNetworkReply *reply)
QNetworkReply * createActiveRequest(QNetworkReply *reply, const QObject *contextObject, QtPrivate::SlotObjUniquePtr slot)
void verifyThreadAffinity(const QObject *contextObject)
The QRestAccessManager is a convenience wrapper for QNetworkAccessManager.
QRestReply is a convenience wrapper for QNetworkReply.
Q_NETWORK_EXPORT int httpStatus() const
Returns the HTTP status received in the server response.
Q_NETWORK_EXPORT bool isHttpStatusSuccess() const
Returns whether the HTTP status is between 200..299.
QRestReply(QRestReply &&other) noexcept
Move-constructs the reply from other.
bool isSuccess() const
Returns whether the HTTP status is between 200..299 and no further errors have occurred while receivi...
Q_NETWORK_EXPORT bool hasError() const
Returns whether an error has occurred.
Q_NETWORK_EXPORT ~QRestReply()
Destroys this QRestReply object.
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
static const QByteArray & PATCH()
#define QREST_METHOD_CUSTOM_WITH_DATA(DATA)
#define QREST_METHOD_NO_DATA(METHOD)
#define QREST_METHOD_WITH_DATA(METHOD, DATA)
QtPrivate::SlotObjSharedPtr slot
QPointer< const QObject > contextObject