19 #ifndef QGSNETWORKREPLYPARSER_H 20 #define QGSNETWORKREPLYPARSER_H 24 #include <QNetworkReply> 26 #include "qgis_core.h" 59 int parts()
const {
return mHeaders.size(); }
66 QByteArray
rawHeader(
int part,
const QByteArray &headerName )
const {
return mHeaders.value( part ).value( headerName ); }
69 QList< RawHeaderMap >
headers()
const {
return mHeaders; }
75 QByteArray
body(
int part )
const {
return mBodies.value( part ); }
78 QList<QByteArray>
bodies()
const {
return mBodies; }
81 QString
error()
const {
return mError; }
86 static bool isMultipart( QNetworkReply *reply );
89 QNetworkReply *mReply =
nullptr;
96 QList< RawHeaderMap > mHeaders;
99 QList<QByteArray> mBodies;
QByteArray rawHeader(int part, const QByteArray &headerName) const
Get part header.
int parts() const
Get number of parts.
QList< RawHeaderMap > headers() const
Get headers.
QMap< QByteArray, QByteArray > RawHeaderMap
QByteArray body(int part) const
Get part part body.
bool isValid() const
Indicates if successfully parsed.
QString error() const
Parsing error.
Multipart QNetworkReply parser.
QList< QByteArray > bodies() const
Get bodies.