ModuleHTTP.h 514 B

12345678910111213141516171819202122232425
  1. #ifndef MDD_MODULEHTTP_H
  2. #define MDD_MODULEHTTP_H
  3. #include "ModuleBase.h"
  4. #include <httplib.h>
  5. using namespace httplib;
  6. namespace mdd{
  7. class ModuleHTTP : public ModuleBase{
  8. private:
  9. std::string _fname;
  10. std::string _id;
  11. int _port;
  12. protected:
  13. std::string str_to_json(const std::string& input);
  14. void updateLayout();
  15. public:
  16. ModuleHTTP(std::string fname, std::string id, int port);
  17. bool update() override;
  18. };
  19. }
  20. #endif //MDD_MODULEHTTP_H