NetworkRequest onError now uses NetworkResult
This commit is contained in:
@@ -8,7 +8,7 @@ namespace chatterino {
|
||||
class NetworkResult
|
||||
{
|
||||
public:
|
||||
NetworkResult(const QByteArray &data);
|
||||
NetworkResult(const QByteArray &data, int status);
|
||||
|
||||
/// Parses the result as json and returns the root as an object.
|
||||
/// Returns empty object if parsing failed.
|
||||
@@ -19,8 +19,12 @@ public:
|
||||
/// Parses the result as json and returns the document.
|
||||
rapidjson::Document parseRapidJson() const;
|
||||
const QByteArray &getData() const;
|
||||
int status() const;
|
||||
|
||||
static constexpr int timedoutStatus = -2;
|
||||
|
||||
private:
|
||||
int status_;
|
||||
QByteArray data_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user