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;
QList< QByteArray > bodies() const
Gets bodies.
bool isValid() const
Indicates if successfully parsed.
QMap< QByteArray, QByteArray > RawHeaderMap
int parts() const
Gets number of parts.
QByteArray rawHeader(int part, const QByteArray &headerName) const
Gets part header.
QByteArray body(int part) const
Gets part part body.
QList< RawHeaderMap > headers() const
Gets headers.
QString error() const
Parsing error.
Multipart QNetworkReply parser.