From 02ec7695ea1ca94a86a353147b478e73f76e4a84 Mon Sep 17 00:00:00 2001
From: Jhonatan Sandoval Velasco
<122501764+JhontSouth@users.noreply.github.com>
Date: Thu, 14 Dec 2023 09:50:42 -0500
Subject: [PATCH] include HEAD method to http requests (#6713)
---
.../Actions/HttpRequest.cs | 10 ++++++++--
.../Schemas/Actions/Microsoft.HttpRequest.schema | 3 ++-
.../Microsoft.Bot.Builder.TestBot.Json/testbot.schema | 6 ++++--
tests/tests.schema | 3 ++-
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/HttpRequest.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/HttpRequest.cs
index 2e4292bb36..2222d800ec 100644
--- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/HttpRequest.cs
+++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/HttpRequest.cs
@@ -126,7 +126,12 @@ public enum HttpMethod
///
/// Http DELETE.
///
- DELETE
+ DELETE,
+
+ ///
+ /// Http HEAD.
+ ///
+ HEAD
}
///
@@ -315,7 +320,8 @@ public enum HttpMethod
}
break;
- case HttpMethod.DELETE:
+ case HttpMethod.DELETE:
+ case HttpMethod.HEAD:
response = await client.SendAsync(request, cancellationToken).ConfigureAwait(false);
break;
}
diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema
index 315d36ccb9..c9f918a2a2 100644
--- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema
+++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.HttpRequest.schema
@@ -31,7 +31,8 @@
"POST",
"PATCH",
"PUT",
- "DELETE"
+ "DELETE",
+ "HEAD"
],
"examples": [
"GET",
diff --git a/tests/Microsoft.Bot.Builder.TestBot.Json/testbot.schema b/tests/Microsoft.Bot.Builder.TestBot.Json/testbot.schema
index 59fd9e1194..e7751e6417 100644
--- a/tests/Microsoft.Bot.Builder.TestBot.Json/testbot.schema
+++ b/tests/Microsoft.Bot.Builder.TestBot.Json/testbot.schema
@@ -3607,7 +3607,8 @@
"POST",
"PATCH",
"PUT",
- "DELETE"
+ "DELETE",
+ "HEAD"
],
"examples": [
"GET",
@@ -9216,7 +9217,8 @@
"POST",
"PATCH",
"PUT",
- "DELETE"
+ "DELETE",
+ "HEAD"
],
"examples": [
"GET",
diff --git a/tests/tests.schema b/tests/tests.schema
index 85383b5cd6..ad41a31b42 100644
--- a/tests/tests.schema
+++ b/tests/tests.schema
@@ -3868,7 +3868,8 @@
"POST",
"PATCH",
"PUT",
- "DELETE"
+ "DELETE",
+ "HEAD"
],
"examples": [
"GET",