From 5f1103f2ddbe9440a516abb04d4db1a38cdc02cb Mon Sep 17 00:00:00 2001 From: George Arama Date: Wed, 10 Jan 2024 11:01:20 -0800 Subject: [PATCH 1/2] Options Http Enum add --- sdk/core/azure-core/CHANGELOG.md | 2 ++ sdk/core/azure-core/inc/azure/core/http/http.hpp | 6 ++++++ sdk/core/azure-core/src/http/http.cpp | 1 + sdk/core/azure-core/test/libcurl-stress-test/README.md | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index c5b9b56ff0..31ef24bae2 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -2,6 +2,8 @@ ## 1.11.0-beta.3 (Unreleased) +- Added 'OPTIONS' HTTP method to `Azure::Core::Http::HttpMethod` enum. + ### Features Added ### Breaking Changes diff --git a/sdk/core/azure-core/inc/azure/core/http/http.hpp b/sdk/core/azure-core/inc/azure/core/http/http.hpp index 2f01b05dfb..8d191b62f3 100644 --- a/sdk/core/azure-core/inc/azure/core/http/http.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/http.hpp @@ -159,6 +159,12 @@ namespace Azure { namespace Core { namespace Http { */ AZ_CORE_DLLEXPORT const static HttpMethod Patch; + /** + * @brief The representation of an `OPTIONS` HTTP method based on [RFC 2616] + * (https://datatracker.ietf.org/doc/html/rfc2616). + */ + AZ_CORE_DLLEXPORT const static HttpMethod Options; + private: std::string m_value; }; // extensible enum HttpMethod diff --git a/sdk/core/azure-core/src/http/http.cpp b/sdk/core/azure-core/src/http/http.cpp index 90746f2a8c..8512cfb34c 100644 --- a/sdk/core/azure-core/src/http/http.cpp +++ b/sdk/core/azure-core/src/http/http.cpp @@ -26,6 +26,7 @@ const HttpMethod HttpMethod::Post("POST"); const HttpMethod HttpMethod::Put("PUT"); const HttpMethod HttpMethod::Delete("DELETE"); const HttpMethod HttpMethod::Patch("PATCH"); +const HttpMethod HttpMethod::Options("OPTIONS"); namespace { bool IsInvalidHeaderNameChar(char c) diff --git a/sdk/core/azure-core/test/libcurl-stress-test/README.md b/sdk/core/azure-core/test/libcurl-stress-test/README.md index fe10a6a79b..c1c7ef1107 100644 --- a/sdk/core/azure-core/test/libcurl-stress-test/README.md +++ b/sdk/core/azure-core/test/libcurl-stress-test/README.md @@ -19,7 +19,7 @@ Where namespace will be created if missing , search directory can be any folder ATM the docker image is build by hand and hard-coded in the chart to simplify matters. -To build the image run "docker build -t /azuresdkforcpp/curlstress:v8 --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on ." +To build the image run "docker build -t /azuresdkforcpp/curlstress:v8 --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on -f .\Dockerfile .\..\..\..\..\..\" To push to mcr : "docker push /azuresdkforcpp/curlstress:v8" Obviously after logging in to the acr "az acr login -n " From 3a1ef3001d0c4f47e9da9e39438c4874013bf731 Mon Sep 17 00:00:00 2001 From: George Arama Date: Wed, 10 Jan 2024 11:43:27 -0800 Subject: [PATCH 2/2] spaces --- sdk/core/azure-core/src/http/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/src/http/http.cpp b/sdk/core/azure-core/src/http/http.cpp index 8512cfb34c..6f2862bdb9 100644 --- a/sdk/core/azure-core/src/http/http.cpp +++ b/sdk/core/azure-core/src/http/http.cpp @@ -26,7 +26,7 @@ const HttpMethod HttpMethod::Post("POST"); const HttpMethod HttpMethod::Put("PUT"); const HttpMethod HttpMethod::Delete("DELETE"); const HttpMethod HttpMethod::Patch("PATCH"); -const HttpMethod HttpMethod::Options("OPTIONS"); +const HttpMethod HttpMethod::Options("OPTIONS"); namespace { bool IsInvalidHeaderNameChar(char c)