15 #ifndef QGSNETWORKREPLY_H
16 #define QGSNETWORKREPLY_H
18 #include "qgis_core.h"
20 #include <QNetworkReply>
56 QVariant attribute( QNetworkRequest::Attribute code )
const;
66 QMap< QNetworkRequest::Attribute, QVariant >
attributes()
const {
return mAttributes; }
75 QNetworkReply::NetworkError
error()
const
103 return mRawHeaderPairs;
113 bool hasRawHeader(
const QByteArray &headerName )
const;
121 QList<QByteArray> rawHeaderList()
const;
130 QByteArray rawHeader(
const QByteArray &headerName )
const;
140 QNetworkRequest
request()
const {
return mRequest; }
148 void setContent(
const QByteArray &content ) { mContent = content; }
158 QByteArray
content()
const {
return mContent; }
162 QNetworkReply::NetworkError mError = QNetworkReply::NoError;
163 QString mErrorString;
164 QList<RawHeaderPair> mRawHeaderPairs;
165 QMap< QNetworkRequest::Attribute, QVariant > mAttributes;
167 QNetworkRequest mRequest;
Encapsulates a network reply within a container which is inexpensive to copy and safe to pass between...
QgsNetworkReplyContent()=default
Default constructor for an empty reply.
QString errorString() const
Returns the error text for the reply, or an empty string if no error was encountered.
void setContent(const QByteArray &content)
Sets the reply content.
QByteArray content() const
Returns the reply content.
QNetworkReply::NetworkError error() const
Returns the reply's error message, or QNetworkReply::NoError if no error was encountered.
QMap< QNetworkRequest::Attribute, QVariant > attributes() const
Returns a list of valid attributes received in the reply.
const QList< RawHeaderPair > & rawHeaderPairs() const
Returns the list of raw header pairs in the reply.
int requestId() const
Returns the unique ID identifying the original request which this response was formed from.
QPair< QByteArray, QByteArray > RawHeaderPair
QNetworkRequest request() const
Returns the original network request.