Maurice Grönwoldt
5bb68a7d02
We have no make install support... so we don't need to have everything as a single-header and lib file.
16 lines
452 B
C++
16 lines
452 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include "Response.h"
|
|
#include "Request.h"
|
|
|
|
namespace VWeb {
|
|
typedef std::optional<Ref<Response>> PreMiddleWareReturn;
|
|
struct MiddleWare {
|
|
int Pos{0};
|
|
virtual PreMiddleWareReturn PreHandle(Request &) { return {}; }
|
|
virtual bool PostHandle(Request &, Response &) { return true; }
|
|
virtual void Shutdown(Request &, const Response &){};
|
|
bool operator<(const MiddleWare *rhs) const { return Pos < rhs->Pos; }
|
|
};
|
|
} |