Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple HTTP Server lib

Tags:

c++

http

What is a good choice for a simple http Server lib? It doesn't need high performance. I rather look for something simple for some REST/JSON communication ("API").

It must be able though to work in a multithreaded environment and must be able to handle large POST request.

Any suggestions? I already tried cpp-netlib but this seems to be much too complicated for such an easy task...

Edit: I am looking for something really light-weight and simple. E.g. like Sinatra in the Ruby world. Poco is for me another example of a too heavy-weight library.

like image 480
Philip Avatar asked Jan 15 '12 01:01

Philip


People also ask

What is simple HTTP server in Python?

The SimpleHTTPServer module is a Python module that enables a developer to lay the foundation for developing a web server. However, as sysadmins, we can use the module to serve files from a directory. Usage. Python must be installed to use the SimpleHTTPServer module.

What is simple HTTP?

Python comes with a built-in module known as SimpleHTTPServer, which in other words is a simple HTTP server that gives you standard GET and HEAD request handlers. This module can turn any directory of your system into a web server.


1 Answers

The first one that comes to mind is Poco Library ( http://pocoproject.org/ )

Cross platform, stable, well documented. While the library itself offers more than you probably need you can build and omit the portions you aren't planning on using to reduce bloat.

They have a fully featured Net library that includes several salient classes and utilities.

Here is a pdf of slides from that library, of particular interest is the HTTPServer class: http://pocoproject.org/slides/200-Network.pdf

like image 64
hsmith Avatar answered Sep 22 '22 11:09

hsmith