19#ifndef QGSNETWORKREPLYPARSER_H
20#define QGSNETWORKREPLYPARSER_H
24#include <QNetworkReply>
61 int parts()
const {
return mHeaders.size(); }
69 QByteArray
rawHeader(
int part,
const QByteArray &headerName )
const {
return mHeaders.value( part ).value( headerName ); }
72 QList< RawHeaderMap >
headers()
const {
return mHeaders; }
79 QByteArray
body(
int part )
const {
return mBodies.value( part ); }
82 QList<QByteArray>
bodies()
const {
return mBodies; }
85 QString
error()
const {
return mError; }
91 static bool isMultipart( QNetworkReply *reply );
94 QNetworkReply *mReply =
nullptr;
101 QList< RawHeaderMap > mHeaders;
104 QList<QByteArray> mBodies;
Multipart QNetworkReply parser.
bool isValid() const
Indicates if successfully parsed.
int parts() const
Gets number of parts.
QMap< QByteArray, QByteArray > RawHeaderMap
QByteArray body(int part) const
Gets part part body.
QByteArray rawHeader(int part, const QByteArray &headerName) const
Gets part header.
QList< RawHeaderMap > headers() const
Gets headers.
QString error() const
Parsing error.
QList< QByteArray > bodies() const
Gets bodies.