summaryrefslogtreecommitdiffstats
path: root/src/afb-hreq.h
diff options
context:
space:
mode:
authorjobol <jose.bollo@iot.bzh>2018-06-18 13:10:45 +0200
committerjobol <jose.bollo@iot.bzh>2018-06-18 14:10:41 +0200
commit7bf0d9c6f807ffae6d9871c606afeccb9b478d3d (patch)
treedc9cd4cc063f14d495d5f24a5c60d6859cb13cc2 /src/afb-hreq.h
parent4521c1e7ae5371ab9d639adc617d17fb4e8ded0c (diff)
afb-hsrv: Add processing of type application/json
Makes the data posted as application/json directly available through json. The previous processing made content transmitted with the content-type application/json available as a string in the field of name "" of the returned json object. Change-Id: I11615b9b147ee4daa1b1358c2bd36fd839d8a7a9 Signed-off-by: jobol <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-hreq.h')
-rw-r--r--src/afb-hreq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afb-hreq.h b/src/afb-hreq.h
index b501af6a..bae178db 100644
--- a/src/afb-hreq.h
+++ b/src/afb-hreq.h
@@ -19,8 +19,10 @@
#include "afb-xreq.h"
-struct afb_session;
struct json_object;
+struct json_tokener;
+
+struct afb_session;
struct hreq_data;
struct afb_hsrv;
struct locale_search;
@@ -44,6 +46,7 @@ struct afb_hreq {
struct MHD_PostProcessor *postform;
struct hreq_data *data;
struct json_object *json;
+ struct json_tokener *tokener;
};
extern int afb_hreq_unprefix(struct afb_hreq *request, const char *prefix, size_t length);