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
This commit is contained in:
Olaf Bergmann committed 2017-07-18 11:43:23 +02:00
1 parent 4e7f909037
commit 44f392d29a
1 file changed
+2 -2
+2 -2
View File
@@ -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)