17 lines
419 B
C++
17 lines
419 B
C++
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
//SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#include "handler.h"
|
|
|
|
Handler::Handler::Handler(const std::string& path, Request::Method method):
|
|
path(path),
|
|
method(method)
|
|
{}
|
|
|
|
Handler::Handler::~Handler() {}
|
|
|
|
void Handler::Handler::error (Request& request, Response::Status status) {
|
|
Response& res = request.createResponse(status);
|
|
res.send();
|
|
}
|