2019-04-07 14:36:10 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/ByteBuffer.h>
|
2019-06-21 18:58:45 +02:00
|
|
|
#include <AK/RefCounted.h>
|
2019-04-07 14:36:10 +02:00
|
|
|
|
2019-06-21 15:29:31 +02:00
|
|
|
class CNetworkResponse : public RefCounted<CNetworkResponse> {
|
2019-04-07 14:36:10 +02:00
|
|
|
public:
|
2019-04-10 22:28:10 +02:00
|
|
|
virtual ~CNetworkResponse();
|
2019-04-07 14:36:10 +02:00
|
|
|
|
|
|
|
|
bool is_error() const { return m_error; }
|
|
|
|
|
const ByteBuffer& payload() const { return m_payload; }
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-04-10 22:28:10 +02:00
|
|
|
explicit CNetworkResponse(ByteBuffer&&);
|
2019-04-07 14:36:10 +02:00
|
|
|
|
|
|
|
|
bool m_error { false };
|
|
|
|
|
ByteBuffer m_payload;
|
|
|
|
|
};
|