mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-27 01:07:10 +03:00
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:
1 parent
4e7f909037
commit
44f392d29a
1 file changed
+2
-2
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user