2025-03-07 02:25:53 +01:00

43 lines
1.1 KiB
C++

#ifndef seafire__resources__handle_get_hxx_
#define seafire__resources__handle_get_hxx_
#include <seafire/common/invoke.hxx>
#include <seafire/protocol/media-type.hxx>
#include <seafire/protocol/rfc7231/content-type.hxx>
#include <seafire/protocol/rfc7231/location.hxx>
#include <seafire/protocol/rfc7232/etag.hxx>
#include <seafire/protocol/rfc7232/last-modified.hxx>
#include <seafire/representation/representation.hxx>
#include <seafire/representation/select.hxx>
#include <seafire/representation/send.hxx>
#include <seafire/resources/concepts.hxx>
#include <seafire/resources/metadata.hxx>
#include <seafire/resources/preconditions.hxx>
#include <seafire/server/transaction.hxx>
#include <optional>
namespace seafire::resources
{
enum class get_kind_t {
get,
head,
created_resource,
updated_resource
};
template<GettableResource R>
void
handle_get(server::request_t& req,
server::response_t& res,
R const& resource,
std::optional<protocol::media_type_t> const& accepted_type,
get_kind_t kind);
} // namespace seafire::resources
#include <seafire/resources/handle-get.txx>
#endif