Pistache

An elegant C++ REST framework.

Getting Started

Pistache is a web framework written in Modern C++ that focuses on performance and provides an elegant and asynchronous API.

#include "pistache/pistache.h"

Download

To download the latest available release, clone the repository over github. Make sure you have git installed first.

git clone https://github.com/oktal/pistache.git

Now, compile the sources with CMake

cd pistache
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

And that’s it, now you can start playing with your newly installed Pistache framework.

Overview

Hello World server

Let’s start by defining our handler

using namespace Net;

class HelloHandler : public Http::Handler {
public:
    HTTP_PROTOTYPE(HelloHandler)

    void onRequest(const Http::Request& request, Http::ResponseWriter response) {
         response.send(Http::Code::Ok, "Hello, World");
    }
};
<< Older
Newer >>