diff options
Diffstat (limited to 'include/Response.hpp')
-rw-r--r-- | include/Response.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/Response.hpp b/include/Response.hpp new file mode 100644 index 0000000..53043c8 --- /dev/null +++ b/include/Response.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "crow.h" + +#include "AnnotationTypes.hpp" + +namespace Response { + using Reply::AnnotationType; + typedef crow::json::wvalue json; + + json simple_response(std::string const &text, std::string const &session = "null", bool success = true); + + json create_annotation(AnnotationType annotation = AnnotationType::none, std::string const &extra = ""); + + json create_text(std::string const &text); + + json create_text(std::string const &text, std::vector<json> &&annotations); + + json create_response(std::vector<json> &&reply, std::string const &session = "null", bool success = true); +}
\ No newline at end of file |