WebAPIBase.h 554 B

123456789101112131415161718192021222324252627
  1. #ifndef _WEBAPIBASE_H_
  2. #define _WEBAPIBASE_H_
  3. #include "lhhttpapi.h"
  4. #include "commonDefine.h"
  5. class WebAPIBase
  6. {
  7. public:
  8. WebAPIBase() = default;
  9. virtual ~WebAPIBase();
  10. /* 初始化WebAPI */
  11. virtual bool initWebApi(const QString& url, const QString& serID, const QString appType, const QString& serverIP = "");
  12. protected:
  13. /* 将json的key转换成小写 */
  14. bool convertJsonKeyToLower(const nJson& json, nJson& result);
  15. protected:
  16. lhhttpapi* m_httpApi = nullptr;
  17. QString m_userToken;
  18. };
  19. #endif /* _WEBAPIBASE_H_ */