Add QUERY method (internal only) (#103)

This commit is contained in:
Guoye Zhang authored and GitHub committed 2025-09-20 00:46:58 -07:00
1 parent b00139f252
commit 97c96755ae
1 file changed
+9
+9
View File
@@ -495,6 +495,15 @@ extension HTTPRequest.Method {
/// https://www.rfc-editor.org/rfc/rfc5789.html
public static var patch: Self { .init(unchecked: "PATCH") }
/// QUERY
///
/// https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/
static var query: Self { .init(unchecked: "QUERY") }
/// CONNECT-UDP
static var connectUDP: Self { .init(unchecked: "CONNECT-UDP") }
var isSafe: Bool {
self == .get || self == .head || self == .options || self == .query
}
}