mirror of
https://gitlab.com/comunic/comunicwatcher
synced 2024-10-22 22:53:24 +00:00
29 lines
399 B
C++
29 lines
399 B
C++
/**
|
|
* This class contains the response to an API request
|
|
*
|
|
* @author Pierre Hubert
|
|
*/
|
|
|
|
#include <QByteArray>
|
|
#include <QJsonObject>
|
|
|
|
#pragma once
|
|
|
|
class APIResponse
|
|
{
|
|
public:
|
|
APIResponse(int mCode, QByteArray content);
|
|
|
|
int getCode() const;
|
|
|
|
QByteArray getContent() const;
|
|
|
|
bool isError();
|
|
|
|
QJsonObject getObject() const;
|
|
|
|
private:
|
|
int mCode;
|
|
QByteArray mContent;
|
|
};
|