comunicwatcher/apiresponse.h

29 lines
399 B
C
Raw Normal View History

2020-06-12 16:20:53 +00:00
/**
* This class contains the response to an API request
*
* @author Pierre Hubert
*/
#include <QByteArray>
2020-06-12 16:26:55 +00:00
#include <QJsonObject>
2020-06-12 16:20:53 +00:00
#pragma once
class APIResponse
{
public:
APIResponse(int mCode, QByteArray content);
int getCode() const;
QByteArray getContent() const;
bool isError();
2020-06-12 16:26:55 +00:00
QJsonObject getObject() const;
2020-06-12 16:20:53 +00:00
private:
int mCode;
QByteArray mContent;
};