aboutsummaryrefslogtreecommitdiffstats
path: root/include/Response.hpp
blob: 53043c8231d4cd145a9fcf261b16067c254c6511 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
}