QtWebApp HTTP Server in C++

QtWepApp is a HTTP server library in C++, inspired by Java Servlets. For Linux, Windows, Mac OS and many other operating systems that the Qt Framework supports.

QtWebApp contains the following components:

  • HTTP(S) Server
  • Template Engine
  • File Logger

These components can be used independently of each other. A very small usage example:

// The main program starts the HTTP server
int main(int argc, char *argv[])
{
QCoreApplication app(argc,argv); new HttpListener(
new QSettings("configfile.ini",QSettings::IniFormat,&app),
new MyRequestHandler(&app),
&app); return app.exec();
} // The request handler receives and responds HTTP requests
void MyRequestHandler::service(HttpRequest& request, HttpResponse& response)
{
// Get a request parameters
QByteArray username=request.getParameter("username"); // Set a response header
response.setHeader("Content-Type", "text/html; charset=UTF-8"); // Generate the HTML document
response.write("<html><body>");
response.write("Hello ");
response.write(username);
response.write("</body></html>");
}

The small memory requirement of about 2MB qualifies the web server to be used in embedded systems. For example for the Beer brewing machine of Sebastian Düll. But it's also powerful enough for larger web services.

The logger improves disk space and performance by retaining debug messages in memory until an error occurs. No debug messages are written as long everything works fine. Changes to the configuration of the logger become active automatically without program restart.

Source codeTutorialAPI documentation.

The library runs with Qt version 4.7 to 6.x. In case of Qt 6 you need to install the Qt5Compat library. It contains support for a lot of 8 Bit character encodings, that Qt6 does not support anymore by default. You may use the software under the conditions of the LGPL License.

Thanks

The current high quality of the library is the result of the collaboration of many people. I would like to thank the helpers for testing QtWebApp extensively in a productive environment and thus contributing to the improvement.

QtWebApp HTTP Server in C++的更多相关文章

  1. 最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目

    最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目 最近一个来自重庆的客户找到走起君,客户的业务是做移动互联网支付,是微信支付收单渠道合作伙伴,数据库里存储的是支付流水和交易流水 ...

  2. SQL Server 大数据搬迁之文件组备份还原实战

    一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 解决方案(Solution) 搬迁步骤(Procedure) 搬迁脚本(SQL Codes) ...

  3. Sql Server系列:分区表操作

    1. 分区表简介 分区表在逻辑上是一个表,而物理上是多个表.从用户角度来看,分区表和普通表是一样的.使用分区表的主要目的是为改善大型表以及具有多个访问模式的表的可伸缩性和可管理性. 分区表是把数据按设 ...

  4. SQL Server中的高可用性(2)----文件与文件组

        在谈到SQL Server的高可用性之前,我们首先要谈一谈单实例的高可用性.在单实例的高可用性中,不可忽略的就是文件和文件组的高可用性.SQL Server允许在某些文件损坏或离线的情况下,允 ...

  5. 从0开始搭建SQL Server AlwaysOn 第一篇(配置域控)

    从0开始搭建SQL Server AlwaysOn 第一篇(配置域控) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnb ...

  6. 从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群)

    从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

  7. 从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)

    从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://w ...

  8. 从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点)

    从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

  9. SQL Server on Linux 理由浅析

    SQL Server on Linux 理由浅析 今天的爆炸性新闻<SQL Server on Linux>基本上在各大科技媒体上刷屏了 大家看到这个新闻都觉得非常震精,而美股,今天微软开 ...

  10. SQL Server相关书籍

    SQL Server相关书籍 (排名不分先后) Microsoft SQL Server 企业级平台管理实践 SQL Server 2008数据库技术内幕 SQL Server性能调优实战 SQL S ...

随机推荐

  1. 深入理解 Taier:MR on Yarn 的实现原理

    我们今天常说的大数据技术,它的理论基础来自于2003年 Google 发表的三篇论文,<The Google File System>.<MapReduce: Simplified ...

  2. 官宣!Taier1.3新版本正式发布,新鲜功能抢先体验

    2022年11月7日,Taier1.3版本正式发布! Taier 是一个大数据分布式可视化的DAG任务调度系统,旨在降低ETL开发成本.提高大数据平台稳定性,大数据开发人员可以在 Taier 直接进行 ...

  3. Function AI 工作流发布:以 AI 重塑企业流程自动化

    AI 工作流如何重塑企业自动化流程 在 AI 技术飞速发展的今天,企业的流程自动化方式也正在发生深刻变革.过去,流程自动化往往依赖于人工配置和固定规则,难以适应复杂.多变的业务场景.而如今, 随着 L ...

  4. 尚硅谷SpringMVC学习笔记第10-13节(文件上传和下载、拦截器、异常处理器、注解配置SpringMVC)

    转载于https://blog.csdn.net/weixin_57341232/article/details/126423746

  5. ts 运行时和打包问题

    esm问题 两个关于模块配置项 compilerOptions.module 决定tsc打包模块后的输出,如esm或cjs compilerOptions.moduleResolution 影响的是在 ...

  6. vite使用短链接

    增加改配置项 vite.config.js import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' impor ...

  7. 超星学习通逆向接口参数加密分析 - 课程页面切换tab接口

    超星的接口分析了很久,分析到这个接口的时候才想到写篇博客,之前的一些接口和分析就没写下来 先开俩坑在这里,等以后再填 1.如何抓安卓APP上HTTPS的包(需ROOT) 2.如何逆向安卓APP 本次分 ...

  8. Society-HiSciTech-BigDataAIML+ICEE-Sensor-产业升级 + 应用: 自动/数字/智慧化: Temperature+Humidity+Pressure:温度/湿度/气/液体压强 传感器: TI + NXP+ Bosc环境感知传感器方案 + Sensiron 另外 传感器参数指标: 温度、湿度、气压、气流速、大气颗粒物浓度,CO₂/O₂浓度

    数字气象站: 能提供 温度.湿度.气压.气流速.大气颗粒物浓度,CO₂/O₂浓度 环境采集: 室内: 温.湿.光.CO2采集,土壤温湿.PH.EC采集, 户外: 雨雪.降雨量等气象采集;以及定时定量施 ...

  9. tf.keras.layers.Embedding + tf.keras.layers.TextVectorization + tf.keras.layers.StringLookup + tf.keras.layers.IntegerLookup

    Turns positive integers(indexes) into dense vectors of fixed size. e.g. [[4], [20]] -> [[0.25, 0. ...

  10. SciTech-Mathmatics-Probability+Statistics: CDF/PDF图解 + the Frequency+Theoritical+Subjective Interpretation of Probability

    PDF/CDF图解 Subjective Interpretation of Probability: Frequency Interpretation of Probability: Theorit ...