5#include <unordered_map>
6#include <magpie/routing/Compile.hpp>
7#include "StatusCode.hpp"
8#include "magpie/transfer/adapters/DataAdapter.hpp"
17 std::unordered_map<std::string, std::string>
headers;
25 std::string contentType =
"text/plain";
31 std::string&& contentType =
"text/plain"
35 std::shared_ptr<DataAdapter>&& bodyAdapter,
36 std::string&& contentType
39 Response(Response&&) =
delete;
40 Response(Response&) =
delete;
42 virtual ~Response() =
default;
44 void setBody(std::string&& body);
46 Response& operator=(Response&& other) =
default;
63 bool permanent =
false
Definition DataAdapter.hpp:16
Definition CompressedResponse.hpp:21
std::unordered_map< std::string, std::string > headers
Definition Response.hpp:17
static void moved(Response &out, std::string &&dest)
Definition Response.cpp:53
static void redirect(Response &out, std::string &&dest, bool permanent=false)
Definition Response.cpp:42
Definition StatusCode.hpp:25