diff --git a/src/Http/Http.Abstractions/src/HttpMethods.cs b/src/Http/Http.Abstractions/src/HttpMethods.cs
index 187591b4e3eb..3be3155db0d3 100644
--- a/src/Http/Http.Abstractions/src/HttpMethods.cs
+++ b/src/Http/Http.Abstractions/src/HttpMethods.cs
@@ -49,6 +49,10 @@ public static class HttpMethods
///
public static readonly string Put = "PUT";
///
+ /// HTTP "QUERY" method.
+ ///
+ public static readonly string Query = "QUERY";
+ ///
/// HTTP "TRACE" method.
///
public static readonly string Trace = "TRACE";
@@ -149,6 +153,18 @@ public static bool IsPut(string method)
return Equals(Put, method);
}
+ ///
+ /// Returns a value that indicates if the HTTP request method is QUERY.
+ ///
+ /// The HTTP request method.
+ ///
+ /// if the method is QUERY; otherwise, .
+ ///
+ public static bool IsQuery(string method)
+ {
+ return Equals(Query, method);
+ }
+
///
/// Returns a value that indicates if the HTTP request method is TRACE.
///
@@ -175,6 +191,7 @@ string _ when IsDelete(method) => Delete,
string _ when IsOptions(method) => Options,
string _ when IsHead(method) => Head,
string _ when IsPatch(method) => Patch,
+ string _ when IsQuery(method) => Query,
string _ when IsTrace(method) => Trace,
string _ when IsConnect(method) => Connect,
string _ => method
diff --git a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt
index 2944a853cdf2..d0fc0872dd90 100644
--- a/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt
+++ b/src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt
@@ -4,3 +4,5 @@ Microsoft.AspNetCore.Http.Metadata.IDisableValidationMetadata
Microsoft.AspNetCore.Http.ProducesResponseTypeMetadata.Description.get -> string?
Microsoft.AspNetCore.Http.ProducesResponseTypeMetadata.Description.set -> void
Microsoft.AspNetCore.Http.Metadata.IProducesResponseTypeMetadata.Description.get -> string?
+static Microsoft.AspNetCore.Http.HttpMethods.IsQuery(string! method) -> bool
+static readonly Microsoft.AspNetCore.Http.HttpMethods.Query -> string!
diff --git a/src/Http/Http.Abstractions/test/HttpMethodslTests.cs b/src/Http/Http.Abstractions/test/HttpMethodslTests.cs
index c9d79ecbd6f6..c22cb5a92689 100644
--- a/src/Http/Http.Abstractions/test/HttpMethodslTests.cs
+++ b/src/Http/Http.Abstractions/test/HttpMethodslTests.cs
@@ -20,6 +20,7 @@ public void CanonicalizedValue_Success()
(new string[] { "CONNECT", "Connect", "connect" }, HttpMethods.Connect),
(new string[] { "OPTIONS", "Options", "options" }, HttpMethods.Options),
(new string[] { "PATCH", "Patch", "patch" }, HttpMethods.Patch),
+ (new string[] { "QUERY", "Query", "query" }, HttpMethods.Query),
(new string[] { "TRACE", "Trace", "trace" }, HttpMethods.Trace)
};