We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b00139f commit 97c9675Copy full SHA for 97c9675
Sources/HTTPTypes/HTTPRequest.swift
@@ -495,6 +495,15 @@ extension HTTPRequest.Method {
495
/// https://www.rfc-editor.org/rfc/rfc5789.html
496
public static var patch: Self { .init(unchecked: "PATCH") }
497
498
+ /// QUERY
499
+ ///
500
+ /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/
501
+ static var query: Self { .init(unchecked: "QUERY") }
502
+
503
/// CONNECT-UDP
504
static var connectUDP: Self { .init(unchecked: "CONNECT-UDP") }
505
506
+ var isSafe: Bool {
507
+ self == .get || self == .head || self == .options || self == .query
508
+ }
509
}
0 commit comments