1
0
forked from blue/pica
pica/handler/handler.h

27 lines
479 B
C
Raw Normal View History

2023-12-13 20:33:11 +00:00
// 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;
};
}