From 52cd89698e18f03b6390c32f2d966a403abc82f2 Mon Sep 17 00:00:00 2001 From: "hrushikesh.bhosale" Date: Thu, 18 Jul 2024 15:34:21 +0530 Subject: [PATCH] feat(esp_http_client): Added http method REPORT Added support http REPORT method and tested it using local server. Added test case for REPOPRT method in esp_http_client_example.c The URL(httpbin.org) does not support for /report endpoint. Closes https://github.com/espressif/esp-idf/issues/14147 --- components/esp_http_client/esp_http_client.c | 3 ++- components/esp_http_client/include/esp_http_client.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/esp_http_client/esp_http_client.c b/components/esp_http_client/esp_http_client.c index cfce504354..651c7e2d51 100644 --- a/components/esp_http_client/esp_http_client.c +++ b/components/esp_http_client/esp_http_client.c @@ -184,7 +184,8 @@ static const char *HTTP_METHOD_MAPPING[] = { "UNLOCK", "PROPFIND", "PROPPATCH", - "MKCOL" + "MKCOL", + "REPORT" }; static esp_err_t esp_http_client_request_send(esp_http_client_handle_t client, int write_len); diff --git a/components/esp_http_client/include/esp_http_client.h b/components/esp_http_client/include/esp_http_client.h index bb9319e42d..d35a361900 100644 --- a/components/esp_http_client/include/esp_http_client.h +++ b/components/esp_http_client/include/esp_http_client.h @@ -116,6 +116,7 @@ typedef enum { HTTP_METHOD_PROPFIND, /*!< HTTP PROPFIND Method */ HTTP_METHOD_PROPPATCH, /*!< HTTP PROPPATCH Method */ HTTP_METHOD_MKCOL, /*!< HTTP MKCOL Method */ + HTTP_METHOD_REPORT, /*!< HTTP REPORT Method */ HTTP_METHOD_MAX, } esp_http_client_method_t;