diff --git a/Sources/Helpers/Request.swift b/Sources/Helpers/Request.swift deleted file mode 100644 index 95820729..00000000 --- a/Sources/Helpers/Request.swift +++ /dev/null @@ -1,29 +0,0 @@ -import Foundation - -#if canImport(FoundationNetworking) - import FoundationNetworking -#endif - -extension CharacterSet { - /// Creates a CharacterSet from RFC 3986 allowed characters. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to - /// allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" - /// and "/" - /// should be percent-escaped in the query string. - static let postgrestURLQueryAllowed: CharacterSet = { - let generalDelimitersToEncode = - ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - let encodableDelimiters = - CharacterSet(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - return CharacterSet.urlQueryAllowed.subtracting(encodableDelimiters) - }() -}