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 a036215 commit 75d5a4cCopy full SHA for 75d5a4c
Sources/ComposableArchitecturePattern/Server+API.swift
@@ -56,6 +56,30 @@ public extension ServerAPI {
56
let httpMethod = self.supportedHTTPMethods[httpMethodIndex]
57
return try? self.request(httpMethod)
58
}
59
+
60
+ var environment: ServerEnvironment? {
61
+ return nil
62
+ }
63
64
+ var headers: [String: String]? {
65
66
67
68
+ var queries: [URLQueryItem]? {
69
70
71
72
+ var body: Data? {
73
74
75
76
+ var supportedReturnObjects: [Codable.Type]? {
77
78
79
80
+ func supports<T: Codable>(_ object: T.Type) -> Bool {
81
+ return self.supportedReturnObjects?.contains(where: { object == $0 }) ?? false
82
83
84
85
public extension ServerAPI {
0 commit comments