From b3cecb8d2aa1ece423ce21d96a51a6728e78beab Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Sat, 20 Aug 2016 17:16:18 +0800 Subject: [PATCH] temp change of tx route --- main.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 5b24620..bd60012 100644 --- a/main.cpp +++ b/main.cpp @@ -101,7 +101,11 @@ int main(int ac, const char* av[]) { crow::SimpleApp app; CROW_ROUTE(app, "/") - ([&]() { + ([&](const crow::request& req) { + + for (const auto& m : req.headers) + cout << m.first << ": " << m.second << endl; + return xmrblocks.index2(); }); @@ -120,9 +124,18 @@ int main(int ac, const char* av[]) { return xmrblocks.show_block(block_hash); }); +// CROW_ROUTE(app, "/tx/") +// ([&](string tx_hash) { +// return xmrblocks.show_tx(tx_hash); +// }); + CROW_ROUTE(app, "/tx/") - ([&](string tx_hash) { - return xmrblocks.show_tx(tx_hash); + ([&](const crow::request& req) { + + for (const auto& m : req.headers) + cout << m.first << ": " << m.second << endl; + + return ""; }); CROW_ROUTE(app, "/tx//")