Simple Web Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
Alternatives To Simple Web Server
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Postgrest20,617
44 days ago37July 12, 2022207mitHaskell
REST API for any Postgres database
Mockoon5,1313a day ago39August 01, 202272mitTypeScript
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Codeigniter Restserver4,868942a month ago24February 24, 2022mitPHP
A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.
Vulcain3,35823 months ago15October 14, 202122agpl-3.0Go
Fast and idiomatic client-driven REST APIs.
Flaresolverr2,813
2 days ago37mitPython
Proxy server to bypass Cloudflare protection
Aqueduct2,3573522 years ago38June 01, 2020180bsd-2-clauseDart
Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.
Crossbar2,026
3 months ago268otherPython
Crossbar.io - WAMP application router
Simple Web Server2,000
5 years ago55mitC++
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
Nuster1,824
a year ago14otherC
A high performance HTTP proxy cache server and RESTful NoSQL cache server based on HAProxy
Resty1,254
2 years ago3April 20, 20174apache-2.0Java
The minimalist framework of RESTful(server and client) - Resty
Alternatives To Simple Web Server
Select To Compare


Alternative Project Comparisons
Readme

This project has moved to https://gitlab.com/eidheim/Simple-Web-Server.

Simple-Web-Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Asio (both Boost.Asio and standalone Asio can be used). Created to be an easy way to make REST resources available from C++ applications.

See https://gitlab.com/eidheim/Simple-WebSocket-Server for an easy way to make WebSocket/WebSocket Secure endpoints in C++. Also, feel free to check out the new C++ IDE supporting C++11/14/17: https://gitlab.com/cppit/jucipp.

Features

  • Asynchronous request handling
  • Thread pool if needed
  • Platform independent
  • HTTPS support
  • HTTP persistent connection (for HTTP/1.1)
  • Client supports chunked transfer encoding
  • Timeouts, if any of Server::timeout_request and Server::timeout_content are >0 (default: Server::timeout_request=5 seconds, and Server::timeout_content=300 seconds)
  • Simple way to add REST resources using regex for path, and anonymous functions

Usage

See http_examples.cpp or https_examples.cpp for example usage.

See particularly the JSON-POST (using Boost.PropertyTree) and the GET /match/[number] examples, which are most relevant.

Dependencies

  • Boost.Asio or standalone Asio
  • Boost is required to compile the examples
  • For HTTPS: OpenSSL libraries

Compile and run

Compile with a C++11 compliant compiler:

mkdir build
cd build
cmake ..
make
cd ..

HTTP

Run the server and client examples: ./build/http_examples

Direct your favorite browser to for instance http://localhost:8080/

HTTPS

Before running the server, an RSA private key (server.key) and an SSL certificate (server.crt) must be created. Follow, for instance, the instructions given here (for a self-signed certificate): http://www.akadia.com/services/ssh_test_certificate.html

Run the server and client examples: ./build/https_examples

Direct your favorite browser to for instance https://localhost:8080/

Popular Rest Projects
Popular Server Projects
Popular Application Programming Interfaces Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Server
Http
Rest
Https
Asio