pdu.h: new methods FETCH, PATCH, iPATCH from RFC 8132

This commit is contained in:
Olaf Bergmann committed 2017-04-07 10:14:22 +02:00
1 parent f446afdf1e
commit ac94964b45
2 files changed
+5 -1

No files matched your search

+3
View File
@@ -51,6 +51,9 @@
#define COAP_REQUEST_POST 2
#define COAP_REQUEST_PUT 3
#define COAP_REQUEST_DELETE 4
#define COAP_REQUEST_FETCH 5 /* RFC 8132 */
#define COAP_REQUEST_PATCH 6 /* RFC 8132 */
#define COAP_REQUEST_IPATCH 7 /* RFC 8132 */
/* CoAP option types (be sure to update check_critical when adding options */
+2 -1
View File
@@ -271,7 +271,8 @@ msg_type_string(unsigned short t) {
/** Returns a textual description of the method or response code. */
static const char *
msg_code_string(unsigned short c) {
static char *methods[] = { "0.00", "GET", "POST", "PUT", "DELETE", "PATCH" };
static char *methods[] = { "0.00", "GET", "POST", "PUT", "DELETE",
"FETCH", "PATCH", "iPATCH" };
static char buf[5];
if (c < sizeof(methods)/sizeof(char *)) {