QgsNetworkReplyParser class
Multipart QNetworkReply parser.
Contents
It seams that Qt does not have currently support for multipart reply and it is not even possible to create QNetworkReply from raw data so we need a class for multipart QNetworkReply parsing.
Public static functions
- static auto isMultipart(QNetworkReply* reply) -> bool
- Test if reply is multipart.
Constructors, destructors, conversion operators
- QgsNetworkReplyParser(QNetworkReply* reply)
- Constructor.
Public functions
- auto bodies() const -> QList<QByteArray>
- Gets bodies.
- auto body(int part) const -> QByteArray
- Gets part part body.
- auto error() const -> QString
- Parsing error.
- auto headers() const -> QList<RawHeaderMap>
- Gets headers.
- auto isValid() const -> bool
- Indicates if successfully parsed.
- auto parts() const -> int
- Gets number of parts.
- auto rawHeader(int part, const QByteArray& headerName) const -> QByteArray
- Gets part header.
Function documentation
static bool QgsNetworkReplyParser:: isMultipart(QNetworkReply* reply)
Test if reply is multipart.
| Returns | true if reply is multipart |
|---|
QByteArray QgsNetworkReplyParser:: body(int part) const
Gets part part body.
| Parameters | |
|---|---|
| part | part index |
| Returns | part body |
bool QgsNetworkReplyParser:: isValid() const
Indicates if successfully parsed.
| Returns | true if successfully parsed |
|---|
QByteArray QgsNetworkReplyParser:: rawHeader(int part,
const QByteArray& headerName) const
Gets part header.
| Parameters | |
|---|---|
| part | part index |
| headerName | header name |
| Returns | raw header |