From 44f392d29addc848961e69e6d116d01ab96cf777 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 18 Jul 2017 11:43:23 +0200 Subject: [PATCH] client.c: added new method names from RFC 8132 Updated the method names for coap-client option '-m' to include FETCH, PATCH, IPATCH (see [1]). [1] https://tools.ietf.org/html/rfc8132 --- examples/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/client.c b/examples/client.c index de4bac0b..7e942566 100644 --- a/examples/client.c +++ b/examples/client.c @@ -562,7 +562,7 @@ usage( const char *program, const char *version) { "\t-f file\t\tfile to send with PUT/POST (use '-' for STDIN)\n" "\t-k key\t\tPre-shared key for the specified user. This argument\n" "\t \t\trequires DTLS with PSK to be available.\n" - "\t-m method\trequest method (get|put|post|delete), default is 'get'\n" + "\t-m method\trequest method (get|put|post|delete|fetch|patch|ipatch), default is 'get'\n" "\t-N\t\tsend NON-confirmable message\n" "\t-o file\t\toutput received data to this file (use '-' for STDOUT)\n" "\t-p port\t\tlisten on specified port\n" @@ -1009,7 +1009,7 @@ cmdline_input_from_file(char *filename, str *buf) { static method_t cmdline_method(char *arg) { static char *methods[] = - { 0, "get", "post", "put", "delete", 0}; + { 0, "get", "post", "put", "delete", "fetch", "patch", "ipatch", 0}; unsigned char i; for (i=1; methods[i] && strcasecmp(arg,methods[i]) != 0 ; ++i)