# QtRESTClient **Repository Path**: klose28/qt-restclient ## Basic Information - **Project Name**: QtRESTClient - **Description**: Qt的REST的客户端,基础就是qt network模块, 其实没必要弄这个库,但是为了接口统一,维护方便,就有点必要了. 底层是 APIBase类, 封装了network类, 提供 get post put delete 等一系列操作 REST 类是应用层面的, 通过json设置,启动定时器,收到reply后,发送消息, 这一层的功能根据业务要求修改即可 - **Primary Language**: C++ - **License**: CC-BY-SA-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-09-24 - **Last Updated**: 2026-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # QtRESTClient #### 介绍 Qt的REST的客户端,基础就是qt network模块, 其实没必要弄这个库,但是为了接口统一,维护方便,就有点必要了. 底层是 APIBase类, 封装了network类, 提供 get post put delete 等一系列操作 REST 类是应用层面的, 通过json设置,启动定时器,收到reply后,发送消息, 这一层的功能根据业务要求修改即可 #### 软件架构 软件架构说明 ```bash ..\TESTREST │ main.cpp │ mainwindow.cpp │ mainwindow.h │ mainwindow.ui │ TestREST.pro │ Tools.h ├─jsons │ RESTJson │ └─restsrc apibase.cpp apibase.h rest.cpp rest.h rest.pri ``` #### 安装教程 1. pro文件 添加 include (restsrc/rest.pri) 2. 使用说明 1. ```cpp REST *rest = new REST(&w); QFile file("jsons/RESTJson"); if (file.open(QFile::ReadOnly)) { rest->setRESTJson(file.readAll()); file.close(); } rest->start (); QObject::connect (rest,&REST::RESTReply,[](const QByteArray ba){ qout << ba; }); QTimer::singleShot (6000,[rest]{ rest->stop (); }); ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)