//---------------------------------------------------------------------------

#ifndef RestObjectFH
#define RestObjectFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <stdio.h>
#include <DBXJSON.hpp>
#include "McJSON.hpp"
//---------------------------------------------------------------------------

class TRestData
{
public:
    TRestData();
    ~TRestData();

private:
    String FKey;
    String FData;
public:

};
//---------------------------------------------------------------------------

class TRestObject
{
public:
    TRestObject();
    ~TRestObject();

private:

public:

};
//---------------------------------------------------------------------------

class TRestObjectList
{
public:
    TRestObjectList();
    ~TRestObjectList();

private:
    TObject *FRestObject;

public:

};
//---------------------------------------------------------------------------

class TRestObjectManager
{
public:
    TRestObjectManager();
    ~TRestObjectManager();

public:

    static String Get(String AApiUrl, TForm *AParent);
    static TStream* GetStream(String AApiUrl);
    static TMcJsonItem* ParseJsonString(String AJsonData);
    static TMcJsonItem* ParseJsonStream(TStream *AStream);
    static TMcJsonItem* RequestGet(String AApiUrl);
    static String GetValue(TMcJsonItem *AItem, String AKey);

    static bool RequestPost(String AApiUrl, String AJsonData, String &AResult);
};
//---------------------------------------------------------------------------

#endif
