|
RestLink 2.2.0
Powerfull Rest Client for Qt
|
An abstract base class for handling response data streams. More...
#include <responsebase.h>
Inherits QIODevice.
Inherited by RestLink::Response.
Public Member Functions | |
| ResponseBase (QObject *parent=nullptr) | |
| virtual | ~ResponseBase () |
| bool | isSequential () const override |
| bool | open (OpenMode mode) override |
| void | close () override |
| qint64 | pos () const override |
| qint64 | size () const override |
| bool | seek (qint64 pos) override |
| bool | atEnd () const override |
| bool | reset () override |
| qint64 | bytesAvailable () const override |
| qint64 | bytesToWrite () const override |
| bool | canReadLine () const override |
| bool | waitForReadyRead (int msecs) override |
| bool | waitForBytesWritten (int msecs) override |
| virtual QJsonObject | readJsonObject (QJsonParseError *error=nullptr) |
| Reads the response body as a JSON object. | |
| virtual QJsonArray | readJsonArray (QJsonParseError *error=nullptr) |
| Reads the response body as a JSON array. | |
| virtual QJsonValue | readJson (QJsonParseError *error=nullptr) |
| Reads the response body as a JSON value. | |
| virtual QString | readString () |
| Reads the response body as a QString. | |
| virtual QByteArray | readBody () |
| Reads the raw response body as a QByteArray. | |
| QIODevice * | responseDevice () const |
Protected Member Functions | |
| qint64 | readData (char *data, qint64 maxlen) override |
| qint64 | readLineData (char *data, qint64 maxlen) override |
| qint64 | skipData (qint64 maxSize) override |
| qint64 | writeData (const char *data, qint64 len) override |
| void | setResponseDevice (QIODevice *device) |
An abstract base class for handling response data streams.
This class extends QIODevice to provide convenient methods for reading different types of content (JSON objects, arrays, raw bytes, strings) from a response device. It is intended to serve as a flexible interface for response handling in the RestLink framework.
It supports streaming and can wrap any QIODevice to perform actual data access.
|
explicit |
|
virtual |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
virtual |
Reads the response body as a JSON object.
| error | An optional pointer to a QJsonParseError to capture any parsing errors. |
Reimplemented in RestLink::ServerResponse.
|
virtual |
Reads the response body as a JSON array.
| error | An optional pointer to a QJsonParseError to capture any parsing errors. |
Reimplemented in RestLink::ServerResponse.
|
virtual |
Reads the response body as a JSON value.
| error | An optional pointer to a QJsonParseError to capture any parsing errors. |
Reimplemented in RestLink::ServerResponse.
|
virtual |
Reads the response body as a QString.
Reimplemented in RestLink::ServerResponse.
|
virtual |
Reads the raw response body as a QByteArray.
Reimplemented in RestLink::NetworkResponse, and RestLink::ServerResponse.
| QIODevice * RestLink::ResponseBase::responseDevice | ( | ) | const |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
protected |