27 lines
475 B
C++
27 lines
475 B
C++
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
//SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
#include "request/request.h"
|
|
#include "response/response.h"
|
|
|
|
namespace Handler {
|
|
|
|
class Handler {
|
|
protected:
|
|
Handler(const std::string& path, Request::Method method);
|
|
|
|
public:
|
|
virtual ~Handler();
|
|
|
|
virtual void handle(Request& request) = 0;
|
|
|
|
const std::string path;
|
|
const Request::Method method;
|
|
};
|
|
}
|