diff options
Diffstat (limited to 'src/tool_helpers.c')
-rw-r--r-- | src/tool_helpers.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tool_helpers.c b/src/tool_helpers.c index 08248c37c..2f74dc133 100644 --- a/src/tool_helpers.c +++ b/src/tool_helpers.c @@ -69,13 +69,23 @@ const char *param2text(int res) int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store) { + /* this mirrors the HttpReq enum in tool_sdecls.h */ + const char *reqname[]= { + "", /* unspec */ + "GET (-G, --get)", + "HEAD (-I, --head)", + "multipart formpost (-F, --form)", + "POST (-d, --data)" + }; + if((*store == HTTPREQ_UNSPEC) || (*store == req)) { *store = req; return 0; } - - warnf(config->global, "You can only select one HTTP request method!\n"); + warnf(config->global, "You can only select one HTTP request method! " + "You asked for both %s and %s.\n", + reqname[req], reqname[*store]); return 1; } |