mirror of
https://github.com/apple/swift-http-types
synced 2026-11-22 04:30:40 +00:00
Add QUERY method (internal only) (#103)
This commit is contained in:
1 parent
b00139f252
commit
97c96755ae
1 file changed
+9
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user