• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    C++
  • License
    GNU Lesser Genera...
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTTP server library in C++, based on Qt Framework

QtWebApp HTTP Server in C++

Fork from Stefan's QtWebApp: http://stefanfrings.de/qtwebapp/index-en.html

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.
  • 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. A very small example:

Usage

This short example demonstrates how to use the library:

// 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 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();
}

Tutorial

API documentation

See also

More Repositories

1

awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.
59,570
star
2

awesome-github

A curated list of awesome GitHub tools, libraries, resources, and shiny things.
497
star
3

awesome-courses

List of free online programming/CS courses [Massive Open Online Courses]
381
star
4

awesome-selfhosted-aws

A curated list of awesome self-hosted alternatives to Amazon Web Services (AWS)
365
star
5

fakessh

A dockerized fake SSH server honeypot written in Go that logs login attempts.
Go
311
star
6

awesome-persian

A curated list of amazingly awesome Persian supporting tools, fonts, and development resources.
224
star
7

awesome-avr

A curated list of awesome AVR tools, libraries, resources, and shiny things. Inspired by awesome-... stuff.
125
star
8

docker-qt

C++ Qt compile environment for Docker (Dynamically Linked, Statically Linked, and Cross-compiled to Windows)
Dockerfile
116
star
9

cppDES

C++ implementation of Data Encryption Standard (DES, 3DES) (ECB, CBC)
C++
111
star
10

dockerweb

A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.
Shell
97
star
11

awesome-qt

Awesome Qt.
80
star
12

Lan-Messenger

C++ Qt Serverless Lan Messenger, Private Messages & Chat Rooms, Voice Talk
C++
76
star
13

Etcetera

My collection of useful code snippets/recipes/scripts/macros for my everyday tasks
JavaScript
68
star
14

microdns

A tiny dockerized DNS server in Go that (almost) always returns the same IP for any query sent to it.
Go
64
star
15

DFA

Deterministic Finite Automata in C++, Token Parser & Lexer
C++
46
star
16

QtHashSum

File Checksum Integrity Verifier & Duplicate File Finder written in C++ Qt
C++
41
star
17

inSecure-SHell

A telnet like client/server application using pseudo-terminals (pty) that runs a Bash shell session on the remote server. [fork,forkpty,select,epoll,ipv6 code]
C
32
star
18

kernel

Linux kernel programming examples
C
28
star
19

Multimedia

My Multimedia Signal Processing & VOIP Course Projects & Assignments
C
20
star
20

Faraz-DNS-Server

This is a simple DNS server written in Qt C++
C++
19
star
21

GHSOM-CPP

Growing Hierarchical Self-Organizing Map (GHSOM) implementation in C++
C++
19
star
22

Simple-PHP-Request-Logger

A light-weight php script to log all http request hits into a file.
PHP
17
star
23

Tron

Tron AI Challenge
C++
12
star
24

dns-proxy-go

DNS proxy written in Go
Go
12
star
25

Qtnpcap

Qt GUI for npcap
C++
11
star
26

Toefl-Speaking-Recorder

Specialized Recorder for TOEFL SPEAKING
C++
11
star
27

nvidia-smi-json

nvidia-smi xml to json
Go
10
star
28

datasets

My collection of random datasets
10
star
29

docker-bind-webmin

Dockerized BIND DNS Server with Webmin for DNS Administration
Shell
10
star
30

MicroDNS-Server

This compact and simple DNS server does only one thing: Always return the same IP for any query sent to the DNS server.
C
9
star
31

XOREncryption

Simple XOR File Encryption in C on Linux
C
8
star
32

TCP-GUI

TCP socket GUI in Qt
C++
7
star
33

QtScreenCapture

Lightweight screen capture tool and screen video recorder
C++
6
star
34

Introduction-to-Microprocessors

http://www.cs.mun.ca/~paul/cs4723/
6
star
35

GameOfLife

SFML-based Conway's Game of Life simulation in C++
C++
4
star
36

gotcpproxy

TCP over TLS Proxy in Go
Go
4
star
37

bootloader

Assembly
4
star
38

Arooz

Persian/Arabic Poems Prosody Recognition
4
star
39

Qt-Torrent

Qt Torrent Example
C++
4
star
40

QtLogServerGUI

UDP 514 Log Server GUI in Qt
C++
4
star
41

Microprocessor-Lab

My AVR Microprocessor Lab assignments
C
4
star
42

NetworqDebugger

NetworqDebugger is a simple tool for software developers that makes it easy to debug networking applications. It provides a proxy that will sit between your software and a remote server and display the conversation between them in GUI.
4
star
43

docker-bind

Dockerized Authoritative-Only BIND DNS Server with catch-all (wildcard) for any domain.
Dockerfile
3
star
44

fffaraz

3
star
45

CS491-Linux-Programming

CS306/CS491 Lab Assignments
C
3
star
46

SHA-CFB-OFB-CTR

Encryption in CFB, OFB, and CTR mode using SHA hash function
C
2
star
47

KN2C-SSL

KN2C Small Size League Robocup Team
C++
2
star
48

php-utils

A collection of useful PHP functions, mini classes and snippets.
PHP
2
star
49

DevToolbox.net

useful developer tools
2
star
50

Hadoop-Median-String

Just playing with Hadoop
Java
1
star
51

CS408-Applied-Cryptography

Applied Cryptography course
C++
1
star
52

Insomnia

by David Anson
C++
1
star
53

Archipel-xmpp-Bug-Reproducer

This is a xmpp Tester Client created to simulate stress testing on Archipel agents.
C++
1
star
54

docker-php

PHP docker image with some extra extensions based on official php:apache image
Shell
1
star
55

portfolio-optimizer

My personal financial calculator and portfolio optimizer
C++
1
star
56

caddy-logger

Log HTTP requests served by Caddy in a SQL database
Go
1
star
57

test-cloudflare-ips

Go
1
star