summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-03-29 14:17:52 +0200
committerChristian Grothoff <christian@grothoff.org>2015-03-29 14:17:52 +0200
commit42147c2501d06c44c8bfbc052d72fb2e97eaa2c6 (patch)
tree16ab21c062882684092e981c46347d4128da30f2 /src/mint/taler-mint-httpd.c
parent3991cd1763c64482834668ad19f892f39fc49f38 (diff)
downloadexchange-42147c2501d06c44c8bfbc052d72fb2e97eaa2c6.tar.gz
exchange-42147c2501d06c44c8bfbc052d72fb2e97eaa2c6.tar.bz2
exchange-42147c2501d06c44c8bfbc052d72fb2e97eaa2c6.zip
switching /withdraw/sign from GET to POST
Diffstat (limited to 'src/mint/taler-mint-httpd.c')
-rw-r--r--src/mint/taler-mint-httpd.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c
index e9bfac730..1315ba204 100644
--- a/src/mint/taler-mint-httpd.c
+++ b/src/mint/taler-mint-httpd.c
@@ -137,54 +137,63 @@ handle_mhd_request (void *cls,
{ "/agpl", MHD_HTTP_METHOD_GET, "text/plain",
NULL, 0,
&TMH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND },
+
{ "/keys", MHD_HTTP_METHOD_GET, "application/json",
NULL, 0,
&TMH_KS_handler_keys, MHD_HTTP_OK },
{ "/keys", NULL, "text/plain",
"Only GET is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
{ "/withdraw/status", MHD_HTTP_METHOD_GET, "application/json",
NULL, 0,
&TMH_WITHDRAW_handler_withdraw_status, MHD_HTTP_OK },
{ "/withdraw/status", NULL, "text/plain",
"Only GET is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
- { "/withdraw/sign", MHD_HTTP_METHOD_GET, "application/json",
+
+ { "/withdraw/sign", MHD_HTTP_METHOD_POST, "application/json",
NULL, 0,
&TMH_WITHDRAW_handler_withdraw_sign, MHD_HTTP_OK },
{ "/withdraw/sign", NULL, "text/plain",
- "Only GET is allowed", 0,
+ "Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
+ { "/deposit", MHD_HTTP_METHOD_POST, "application/json",
+ NULL, 0,
+ &TMH_DEPOSIT_handler_deposit, MHD_HTTP_OK },
+ { "/deposit", NULL, "text/plain",
+ "Only POST is allowed", 0,
+ &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
{ "/refresh/melt", MHD_HTTP_METHOD_POST, "application/json",
NULL, 0,
&TMH_REFRESH_handler_refresh_melt, MHD_HTTP_OK },
{ "/refresh/melt", NULL, "text/plain",
"Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
{ "/refresh/reveal", MHD_HTTP_METHOD_POST, "application/json",
NULL, 0,
&TMH_REFRESH_handler_refresh_melt, MHD_HTTP_OK },
{ "/refresh/reveal", NULL, "text/plain",
"Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
- { "/refresh/link", MHD_HTTP_METHOD_GET, "application/json",
- NULL, 0,
- &TMH_REFRESH_handler_refresh_link, MHD_HTTP_OK },
- { "/refresh/link", NULL, "text/plain",
- "Only GET is allowed", 0,
- &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
- { "/refresh/reveal", MHD_HTTP_METHOD_GET, "application/json",
+
+ { "/refresh/reveal", MHD_HTTP_METHOD_POST, "application/json",
NULL, 0,
&TMH_REFRESH_handler_refresh_reveal, MHD_HTTP_OK },
{ "/refresh/reveal", NULL, "text/plain",
- "Only GET is allowed", 0,
+ "Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
- { "/deposit", MHD_HTTP_METHOD_POST, "application/json",
+
+ { "/refresh/link", MHD_HTTP_METHOD_GET, "application/json",
NULL, 0,
- &TMH_DEPOSIT_handler_deposit, MHD_HTTP_OK },
- { "/deposit", NULL, "text/plain",
- "Only POST is allowed", 0,
+ &TMH_REFRESH_handler_refresh_link, MHD_HTTP_OK },
+ { "/refresh/link", NULL, "text/plain",
+ "Only GET is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
{ NULL, NULL, NULL, NULL, 0, 0 }
};
static struct TMH_RequestHandler h404 =