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