aboutsummaryrefslogtreecommitdiffstats
path: root/include/Response.hpp
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-09-18 16:23:04 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-09-18 16:23:04 +0200
commitfc2f037e216e517ec4b87b0663277a3fc40c1d74 (patch)
tree0877ab6c1f5b13deb99f258ebc447e067ed3ce37 /include/Response.hpp
parent48d6a7408f2371c5b66482cc68ec2b801d444700 (diff)
downloadn_core-fc2f037e216e517ec4b87b0663277a3fc40c1d74.tar.gz
n_core-fc2f037e216e517ec4b87b0663277a3fc40c1d74.zip
fix stuff, start encoding, add doku for attachment sending
Diffstat (limited to 'include/Response.hpp')
-rw-r--r--include/Response.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/Response.hpp b/include/Response.hpp
index 82edb53..3e42d0d 100644
--- a/include/Response.hpp
+++ b/include/Response.hpp
@@ -11,6 +11,11 @@ namespace Response {
// create a full response of just plain text
json simple_response(std::string const &text, std::string const &session = "null", bool success = true);
+ // create file attachment (is an annotation)
+ json create_attachment(std::string const &file_path);
+ json create_attachment(std::string const &file_path, std::string const &file_name);
+ json create_attachment(std::string const &file_path, std::string const &file_name, std::string const &file_type);
+
// "nested" annotations: the extra field is again an array of text-annotation pairs
json create_annotation(AnnotationType annotation, std::vector<json> &&extra);
// construct an extra field with no special annotations in the extra