aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDeliciousGarfield <tianxiduo@qq.com>2016-03-18 12:19:08 +0800
committerDeliciousGarfield <tianxiduo@qq.com>2016-03-18 12:19:08 +0800
commitea131c360704da74e3f0e394eb91f270f60f87ac (patch)
tree7af280b2d9d8ba12d8bad08f78b1761d797331f2 /examples
parent975205075dd61dcdfff4a206b10a6ac14e87f954 (diff)
downloadcrow-ea131c360704da74e3f0e394eb91f270f60f87ac.tar.gz
crow-ea131c360704da74e3f0e394eb91f270f60f87ac.zip
Add a simpler way for json example
Diffstat (limited to 'examples')
-rw-r--r--examples/example.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/example.cpp b/examples/example.cpp
index dec57cd..059f3ab 100644
--- a/examples/example.cpp
+++ b/examples/example.cpp
@@ -106,6 +106,9 @@ int main()
// * Select 'raw' and then JSON
// * Add {"a": 1, "b": 1}
// * Send and you should receive 2
+
+ // A simpler way for json example:
+ // * curl -d '{"a":1,"b":2}' {ip}:18080/add_json
CROW_ROUTE(app, "/add_json")
.methods("POST"_method)
([](const crow::request& req){